Quote:
Originally Posted by TnT
Download fails due to missing security token when Downloads are restricted to members. If a guest tries to download he gets the Login form. After succesfull login he is redirected back to Download, but this fails due to missing security token.
My workaround is to redirect the logged in member to the download page for this file where he can start a new download of the file:
find in downloads.php around line 485:
PHP Code:
eval(standard_error(fetch_error('security_token_invalid', $vbulletin->options['contactuslink'])));
replace with:
PHP Code:
if ($permissions['downloads2permissions'] & $vbulletin->bf_ugp['downloads2permissions']['candownloadfiles'])
{
exec_header_redirect("downloads.php?" . $vbulletin->session->vars['sessionurl'] . "do=file&id=" . $file[id]);
}
else
{
eval(standard_error(fetch_error('security_token_invalid', $vbulletin->options['contactuslink'])));
}
@Jelle: Pleas add this to your repository, thanks 
|
Thank you thank you very much.
This solved the issue
But a question:
The first line that I search for replace (around line 485) I view that appears in more lines, only need replace the line around 485?
Regards!