Page MenuHomePhabricator

Unable to edit any page that start with a parenthesis
Closed, ResolvedPublic

Description

Author: nakor.wp

Description:
Lately (since upgrade to 1.18?) it is not possible to edit any page that start with a parenthesis at fr.wikipedia.org e.g. http://fr.wikipedia.org/wiki/(S)ex_list

The "edit" page work but the "submit" page does not

The error message is:

PHP fatal error in /usr/local/apache/common-local/php-1.18/includes/GlobalFunctions.php line 1197:
Object of class AFPData could not be converted to string


Version: unspecified
Severity: blocker

Details

Reference
bz31379

Event Timeline

bzimport raised the priority of this task from to High.Nov 21 2014, 11:58 PM
bzimport added a project: AbuseFilter.
bzimport set Reference to bz31379.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Oct 5 2011, 3:36 PM

nakor.wp wrote:

Update: this happens only with my main account that has

sysop
checkuser
abusefilter

flags.

Litlok added a comment.Oct 5 2011, 4:00 PM

I confirm. After having created a single-purpose account, I managed to make a simple modification (http://fr.wikipedia.org/w/index.php?title=(5535)_Annefrank&diff=70772016&oldid=69880772) which I could not perform when I was logged in as sysop.

letartean wrote:

Also have problem editing the page. I am also a sysop of fr.wiki.

Can confirm too.

This is not related to the sysop or abusefilter flags (I've the same problem with my “Arktest” account), nor to local scripts (I've same problem with JavaScript disabled).

Best regards,

Arkanosis@frwiki

Backtrace:

#0 /usr/local/apache/common-local/php-1.18/includes/GlobalFunctions.php(1204): strtr('Erreur dans l??...', Array)
#1 /usr/local/apache/common-local/php-1.18/includes/GlobalFunctions.php(1300): wfMsgReplaceArgs('Erreur dans l??...', Array)
#2 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(375): wfMsgExt('abusefilter-exc...', Array, Array)
#3 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(1754): AFPUserVisibleException->__construct('regexfailure', 757, Array)
#4 [internal function]: AbuseFilterParser::regexErrorHandler(2, 'preg_match() [<...', '/usr/local/apac...', 221, Array)
#5 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(221): preg_match('/#((?i)redirect...', 'Il est compos??...')
#6 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(891): AFPData::keywordRegex(Object(AFPData), Object(AFPData), 757)
#7 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(862): AbuseFilterParser->doLevelSpecialWords(Object(AFPData))
#8 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(843): AbuseFilterParser->doLevelBoolInvert(Object(AFPData))
#9 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(829): AbuseFilterParser->doLevelPow(Object(AFPData))
#10 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(810): AbuseFilterParser->doLevelMulRels(Object(AFPData))
#11 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(796): AbuseFilterParser->doLevelSumRels(Object(AFPData))
#12 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(786): AbuseFilterParser->doLevelCompares(Object(AFPData))
#13 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(710): AbuseFilterParser->doLevelBoolOps(Object(AFPData))
#14 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(639): AbuseFilterParser->doLevelConditions(Object(AFPData))
#15 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(574): AbuseFilterParser->doLevelSet(Object(AFPData))
#16 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(562): AbuseFilterParser->doLevelSemicolon(Object(AFPData))
#17 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(546): AbuseFilterParser->doLevelEntry(Object(AFPData))
#18 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.parser.php(531): AbuseFilterParser->intEval('(?? ("user" in...')
#19 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.class.php(396): AbuseFilterParser->parse('(?? ("user" in...', 241)
#20 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.class.php(475): AbuseFilter::checkConditions('(?? ("user" in...', Object(AbuseFilterVariableHolder), true, 'keepvars')
#21 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.class.php(429): AbuseFilter::checkFilter(Object(stdClass), Object(AbuseFilterVariableHolder), true)
#22 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.class.php(740): AbuseFilter::checkAllFilters(Object(AbuseFilterVariableHolder))
#23 /usr/local/apache/common-local/php-1.18/extensions/AbuseFilter/AbuseFilter.hooks.php(42): AbuseFilter::filterAction(Object(AbuseFilterVariableHolder), Object(Title))
#24 [internal function]: AbuseFilterHooks::onEditFilterMerged(Object(EditPage), '{{Infobox Musiq...', '', '')
#25 /usr/local/apache/common-local/php-1.18/includes/Hooks.php(216): call_user_func_array('AbuseFilterHook...', Array)
#26 /usr/local/apache/common-local/php-1.18/includes/GlobalFunctions.php(3621): Hooks::run('EditFilterMerge...', Array)
#27 /usr/local/apache/common-local/php-1.18/includes/EditPage.php(1114): wfRunHooks('EditFilterMerge...', Array)
#28 /usr/local/apache/common-local/php-1.18/includes/EditPage.php(2855): EditPage->internalAttemptSave(false, false)
#29 /usr/local/apache/common-local/php-1.18/includes/EditPage.php(475): EditPage->attemptSave()
#30 /usr/local/apache/common-local/php-1.18/includes/EditPage.php(353): EditPage->edit()
#31 /usr/local/apache/common-local/php-1.18/includes/Wiki.php(498): EditPage->submit()
#32 /usr/local/apache/common-local/php-1.18/includes/Wiki.php(239): MediaWiki->performAction(Object(Article))
#33 /usr/local/apache/common-local/php-1.18/includes/Wiki.php(623): MediaWiki->performRequest()
#34 /usr/local/apache/common-local/php-1.18/includes/Wiki.php(530): MediaWiki->main()
#35 /usr/local/apache/common-local/php-1.18/index.php(57): MediaWiki->run()
#36 /usr/local/apache/common-local/live-1.5/index.php(3): require('/usr/local/apac...')
#37 {main}

Hi Tim, thanks a lot for the stack!

The problem was a filter¹ building a regexp at runtime (which happened to be invalid because of the first character being escaped, then isolated to be matched case-insensitively — which means the “\” was isolated alone instead of the whole “\(”).

This filter was too hackish anyway, so I've disabled it until I find some time to fix bug 24109.

I'm marking the bug as resolved, but I'd like other reporters to check if it works for them.

BTW : only edits from users with more than 100 contributions were filtered, thus explaining why some people had the problem and some others hadn't.

Thanks again and best regards,

¹ https://fr.wikipedia.org/wiki/Sp%C3%A9cial:Filtre_antiabus/45

FYI: I've opened bug 31421.

tagging bugs for Marcus to look at