|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #579 magic_quotes_runtime set to off is not respected when retrieving blob data.
Submitted: 1998-07-24 23:29 UTC Modified: 1998-07-25 16:41 UTC
From: mike at ciredata dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0.2a OS: debian, kernel 2.0.34
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: mike at ciredata dot com
New email:
PHP Version: OS:


 [1998-07-24 23:29 UTC] mike at ciredata dot com
note: magic_quotes_gpc & runtime are both disabled (0).

data for a jpeg:
original length: 2061
after addslashes: 2229
after strip: 2061
after select before strip: 2061
after select after strip: 4

code that produced the error (was tracking the bug down):

        $mylink  =  mysql_connect( "localhost", "mike", "mypass");
        mysql_select_db( "mydb",$mylink);
        $myqry  =  mysql_query( "delete  from  thumbs  where  oid  =  999999",$mylink);
        $fh  =  fopen( "1a.jpg", "r");
        $pic  =  fread($fh,filesize( "1a.jpg"));
        $mypic  =  addslashes($pic);
        $pic2  =  stripslashes($mypic);
        $pics  =  strlen($pic);
        $mypics  =  strlen($mypic);
        $pic2s  =  strlen($pic2);
        $myqry  =  mysql_query( "insert  into  thumbs  (oid,thumb)  values  ('999999','$mypic')",$mylink);
        $myqry  =  mysql_query( "select  *  from  thumbs  where  oid  =  '999999'",$mylink);
        $myarr  =  mysql_fetch_array($myqry);
        $mypic2  =  $myarr[ "thumb"];
        $mypic2s  =  strlen($mypic2);
        $mypic3  =  stripslashes($mypic2);
        $mypic3s  =  strlen($mypic3);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-25 16:41 UTC] zeev
It works exactly as expected
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Nov 22 10:01:24 2019 UTC