https://bugzilla.wikimedia.org/show_bug.cgi?id=35128
Web browser: ---
Bug #: 35128
Summary: Forward slashes in template/form names cause error:
patch for suggested fix attached
Product: MediaWiki extensions
Version: any
Platform: All
OS/Version: All
Status: UNCONFIRMED
Severity: major
Priority: Unprioritized
Component: SemanticForms
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Classification: Unclassified
Mobile Platform: ---
Currently, forward slashes within template or form names will make semantic
forms behave in an unexpected mannor. I encountered this with the preg_replace
code around lines 1430-1460 of SF_FormPrinter.php, but there are many instances
of code throughout where the forward slash is used as a delimiter without
escaping forward slashes in variables included in the expression.
This patch replaces all preg delimiters with the varaible $preg_delim, which
has been set to :, a less common character for mediawiki titles & pages, but
could easily be changed to anything else if a conflict is found.
An alternative to this proposed patch could be to always escape forward slashes
in any preg expressions which contain variable data, however that has a
potentially high processing cost. This is a simpler solution but not without
flaws, it currently assumes the % will not be used within a variable expression
- potentially as dangerous as assuming / will not be used, but it does at least
introduce a means to quickly change all regular expressions to use a different
delimiter.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l