Last modified: 2014-09-24 01:07:51 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 T25172, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 23172 - Disabling signature cleaning breaks SUBST signatures
Disabling signature cleaning breaks SUBST signatures
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Page editing (Other open bugs)
1.16.x
All All
: Low minor (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-12 15:58 UTC by Nikola Kovacs
Modified: 2014-09-24 01:07 UTC (History)
5 users (show)

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


Attachments
Proposed patch (976 bytes, patch)
2010-04-12 15:59 UTC, Nikola Kovacs
Details
Amended patch (945 bytes, patch)
2012-04-19 16:22 UTC, Max Semenik
Details

Description Nikola Kovacs 2010-04-12 15:58:35 UTC
After disabling signature cleaning ($wgCleanSignatures), an editor who uses template substitution (e.g. {{SUBST:User:Example/sig}}) will leave this raw code in the wikitext when signing. The substitution will only occur the next time someone saves the text. See http://rationalwiki.com/wiki/index.php?title=RationalWiki:Technical_support&diff=prev&oldid=359262 and http://rationalwiki.com/wiki/index.php?title=RationalWiki:Technical_support&diff=prev&oldid=359290

The attached patch fixes this by allowing some of the cleaning to take place, but still allows users to have transcluded template signatures
Comment 1 Nikola Kovacs 2010-04-12 15:59:14 UTC
Created attachment 7287 [details]
Proposed patch
Comment 2 p858snake 2011-04-30 00:09:55 UTC
*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*
Comment 3 Sumana Harihareswara 2011-09-30 15:34:13 UTC
Thank you for your patch.  Sorry for the wait in reviewing it!  Could you take a look at the most current version of MediaWiki (in Subversion trunk), check the current behavior, and see if it obsoletes the bug you wanted to fix, and whether your patch still applies cleanly?  Thanks!
Comment 4 Nikola Kovacs 2011-10-07 06:38:19 UTC
I took a quick look at parser.php in svn and it doesn't look like anything has changed, so the patch should still apply.
Comment 5 Max Semenik 2012-04-19 16:22:55 UTC
Created attachment 10439 [details]
Amended patch
Comment 6 Max Semenik 2012-04-19 16:27:01 UTC
A few comments on patch:
* static function is being called non-statically
* Unneeded strict comparison
* Wrong spacing

I've fixed them in the new patch.

However, the main problem with this fix is that it defeats the point of $wgCleanSignatures by cleaning problematic signatures regardless of it. Adding to CC Tim Starling who originally introduced this setting at Wikia's request - Tim, will this change break anything for them?
Comment 7 Nikola Kovacs 2012-04-19 16:53:31 UTC
Thanks for the fixes.

According to the documentation (r1=38278&r2=38279">https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/RELEASE-NOTES?&pathrev=38279&r1=38278&r2=38279), the point of $wgCleanSignatures=false is to disable template removal from sigs (i.e. forcing templates to be subst-ed). The patch still accomplishes that. There's no reason to allow ~~~~ and SUBST to remain in a sig, since the next edit would parse them and change them anyway.
Comment 8 Nikola Kovacs 2012-04-19 18:38:28 UTC
that link failed spectacularly. r38279 change to release-notes
Comment 9 Sumana Harihareswara 2012-10-13 22:51:40 UTC
Wikia folks, can you read the bug comments and let us know your current thoughts?  Thanks.
Comment 10 Gerrit Notification Bot 2014-02-03 23:54:34 UTC
Change 111126 had a related patch set uploaded by Nx:
Subst templates and clean tildes even if $wgCleanSignatures is false

https://gerrit.wikimedia.org/r/111126

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


Navigation
Links