From:             ondrej
Operating system: 
PHP version:      5.3SVN-2012-02-10 (SVN)
Package:          Variables related
Bug Type:         Bug
Bug description:Regression in magic_quotes_gpc fix (CVE-2012-0831)

Description:
------------
Description available here:

https://bugs.launchpad.net/ubuntu/+source/php5/+bug/930115


Basically the attached patch does replace the second location of 
PG(magic_quotes_gpc) with the zend_alter_ini_entry_ex:


-       PG(magic_quotes_gpc) = magic_quotes_gpc;
+
+       if (magic_quotes_gpc) {
+               zend_alter_ini_entry_ex("magic_quotes_gpc", 
sizeof("magic_quotes_gpc"), "1", 1, ZEND_INI_SYSTEM,
ZEND_INI_STAGE_ACTIVATE, 1 
TSRMLS_CC);
+       }

I could be wrong, since my knowledge of PHP internals is lim(knowledge) =
0, but 
this seems to follow the logic of first change.


-- 
Edit bug report at https://bugs.php.net/bug.php?id=61043&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=61043&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=61043&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=61043&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=61043&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=61043&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=61043&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=61043&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=61043&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=61043&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=61043&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=61043&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=61043&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=61043&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=61043&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=61043&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=61043&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=61043&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=61043&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=61043&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=61043&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=61043&r=mysqlcfg

Reply via email to