-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing a security issue
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6faa256
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not output a canonical url, it will urlencode any wiki-friendly characters such as space to
%20
instead of_
and encode slashes.As a result it will output urls that are potentially a 301 redirect (if MediaWiki auto-corrects) and even if it doesn't, it will never be the url that everything points to.
Use
wfUrlencode
instead, or better yet,Title::getCanonicalURL
. See #4.