Updated img_auth.php
This started with localizing the messages with img_auth.php but expanded.
- Localize img_auth.php using img_auth.i18.php and current EN language
- Reorder checks to make sense (and eliminate redundancy). New order of checks should be:
- See if this is a public Wiki (no protections)
- See if server allows PATH_INFO
- Basic directory traversal check
- See if could create the title object
- Check to see if the file exists
- Check to see if tried to access a directory
- See if could create the title object
- Run hook for extended checks
- Check user authorization for this title (UserCan)
- Whitelist check was deprecated - redundant to UserCan
- Add a hook to allow custom checking for Custom FileRepo(s)
- Add a global variable wgImgAuthDetails (img_auth only) that defaults to minimum info, but allows Details if set to true
- Move all "wfDebugLog" into the rejection functions - since they should never get there anyway.
This really cleans up the script file and with the hook and localization should minimize future maintenance.
I've tested to the extent that I can in my environment, but really need code check and other testers.
Would also do documentation.
Version: 1.16.x
Severity: enhancement
attachment img_auth.php ignored as obsolete