Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
Forgot Password?
Navigation

Error logs in downloads

Last updated on 4 years ago
C
ChanSuper Admin
Posted 4 years ago
Thank you for letting us know the error.

See if this will also fix it. This uses later updated functions developed for next code revisions.

if (! get('download_id', FILTER_VALIDATE_INT) ) {
redirect(DOWNLOADS.'downloads.php');
}
S
SystemwebJunior Member
Posted 4 years ago
In last weeks i had almost daily some new entries in Fusion Error Log about undefined indexes at download details page.

There are 2 different reasons for this:
1.) url parameter for download_id was manipulated and requested as: /downloads.php?download_id=7[0]
2.) someone tried sql injection: /downloads.php?download_id=-5442%27%29%29%20OR%207857%3D7857%20AND%20%28%28%27qCfV%27%3D%27qCfV

In both cases the download details site was shown with missing download data. That means there is no method included to handle invalid parameter data for download_id.

I've included a quick fix in my template file by adding following code after
defined('IN_FUSION') || exit;
:
// Fix for invalid download_id in url params
if (IsSet($_GET['download_id']) && (!IsNum($_GET['download_id']) || $_GET['download_id'] < 1)) {
   redirect(DOWNLOADS.'downloads.php');
   exit;
}

Maybe this change is better to implement in core files by dev team?
You can view all discussion threads in this forum.
You cannot start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
You cannot set up a bounty in this discussion thread.
Moderator: Support Team
Users who participated in discussion: Chan, Systemweb