Menu

#1 error downloading quoted filenames

open
nobody
None
5
2002-05-12
2002-05-12
No

Hi.

If magic_quotes_gpc is set to "on" in php.ini,
downloading of a filename containing i.e. a single
quote (') will generate an error.

I reccomend the following:

if (get_cfg_var("magic_quotes_gpc"))
{
$this->file = stripslashes($HTTP_GET_VARS["F"]);
}
else
$this->file = $HTTP_GET_VARS["F"];
}

A patch is attached. Thank you.

/Joakim Bomelin <joakim at bomelin.com>

Discussion

  • Joakim Bomelin

    Joakim Bomelin - 2002-05-12

    magic quotes patch

     
  • Joakim Bomelin

    Joakim Bomelin - 2002-05-12

    magic quotes patch

     
  • Vic

    Vic - 2005-03-14

    Logged In: YES
    user_id=1234095

    Going off of Joakim Bomelin's bug report, in version 0.2.4
    of phpFileFarm:

    line 239,
    $this->file = $get_vars["F"];
    needs to be commented out and replaced with:
    if (get_cfg_var("magic_quotes_gpc")){
    $this->file = stripslashes($get_vars["F"]);
    }else{
    $this->file = $get_vars["F"];
    }

    since the application allows for the creation of files with
    quotes in them, but will not allow you to perform any
    operations on the files if magic_quotes_gpc is on.

    Please fix this in the next version of the application.

    Thank you.

    Vic. <blue1 at users dot sourceforge dot net>

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.