Last modified: 2010-05-15 16:03:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T18570, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 16570 - wpEditToken loses trailing slash in php-5.2.7
wpEditToken loses trailing slash in php-5.2.7
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.13.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Brion Vibber
:
: 16578 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-12-05 17:30 UTC by James F. Carter
Modified: 2010-05-15 16:03 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description James F. Carter 2008-12-05 17:30:13 UTC
having upgraded from php-5.2.6 to php-5.2.7 editing pages in mediawiki fails with the error:
Your edit has been rejected because your client mangled the punctuation characters in the edit token. The edit has been rejected to prevent corruption of the page text. This sometimes happens when you are using a buggy web-based anonymous proxy service.

further investigation reveals the the trailing \ in the wpEditToken is being lost.
Comment 1 Brion Vibber 2008-12-06 01:23:21 UTC
It appears that the magic_quotes_gpc setting is broken in the PHP 5.2.7 release.

While set by default, it doesn't *work*, so MediaWiki sees the setting on and tries to strip the extra backslashes from input. The result is broken input. :(

If you are in a position to disable magic_quotes_gpc in your php.ini, go ahead and do so.
Comment 2 Brion Vibber 2008-12-06 01:25:47 UTC
Upstream bug: http://bugs.php.net/bug.php?id=46759
Comment 3 P.Copp 2008-12-07 00:18:28 UTC
*** Bug 16578 has been marked as a duplicate of this bug. ***
Comment 4 Siebrand Mazeland 2008-12-07 00:24:33 UTC
A quick workaround for 5.2.7 users is to add the following in the php.ini:

filter.default_flags=0

This bug has been fixed in CVS of PHP.
Comment 5 Brion Vibber 2008-12-08 22:08:27 UTC
PHP 5.2.7 has been withdrawn from distribution due to the magic_quotes bug; 5.2.8 will be released shortly with the fix.

If you're using 5.2.7, please downgrade to 5.2.6 immediately or deploy the above workaround if available.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links