https://bugzilla.wikimedia.org/show_bug.cgi?id=32195
Web browser: ---
Bug #: 32195
Summary: Inconsistent Title validation in File & FileRepo
Product: MediaWiki
Version: 1.19-svn
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Images and files
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
Blocks: 32031
Classification: Unclassified
Found while investigating bug 32031 -- a lot of File & FileRepo functions
accept either a string or a Title object as a reference, normalizing strings to
titles with forced NS_FILE and aborting if it's an invalid title object.
However a) this code is duplicated in many functions and b) few or none of them
seem to validate a Title object that gets passed in. As a result some things
seem to sorta work with Media: or other namespaces but somewhere along the line
something breaks.
Should probably have a common input validation function for these methods to
use, which will:
* do the string to title conversion
* discard invalid title objects
* normalize NS_MEDIA to NS_FILE
* discard title objects in non-file namespaces
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l