r42805 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r42804‎ | r42805 | r42806 >
Date:10:37, 30 October 2008
Author:river
Status:old
Tags:
Comment:
sjs un-encodes the url, so re-encode it to preserve previous behaviour (alternative, we could remove the check for high bits in the request...)
Modified paths:
  • /trunk/tools/upload-scripts/thumb-handler.php (modified) (history)

Diff [purge]

Index: trunk/tools/upload-scripts/thumb-handler.php
@@ -4,7 +4,8 @@
55 # sjs sets that to the 404 handler, and puts the original
66 # request in REDIRECT_URL.
77 if (isset($_SERVER['REDIRECT_URL'])) {
8 - $uri = $_SERVER['REDIRECT_URL'];
 8+ # The URL is un-encoded, so put it back how it was.
 9+ $uri = str_replace("%2F", "/", urlencode($_SERVER['REDIRECT_URL']));
910 } else {
1011 $uri = $_SERVER['REQUEST_URI'];
1112 }

Status & tagging log