https://bugzilla.wikimedia.org/show_bug.cgi?id=32031

--- Comment #5 from Brion Vibber <[email protected]> 2011-11-04 00:04:14 UTC 
---
Ok on a local test I can confirm that wfFindFile and its cousins resolve
redirects for File: title object but, for some reason, not for Media: title
objects.

Unfortunately it looks like there are a *LOT* of entry points into File /
FileRepo functions that take 'string or Title object' and are .... sloppy in
validation.

Strings usually get Title'ized via Title::makeTitleSafe with an NS_FILE, but a
Title object passed directly in doesn't get validated for namespace.

This probably leads to an NS_MEDIA Title object floating around, and eventually
some lookup goes to that in the page table and fails.

There should probably be a consistent input validator used by all of these
functions, which will do string -> Title conversions *and* validate the
namespace. This could alias Media to File and drop any other namespaces as
invalid for files...

-- 
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

Reply via email to