Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/392170 )

Change subject: Make SwiftFileBackend::resolveContainerPath use rawurlencode
......................................................................

Make SwiftFileBackend::resolveContainerPath use rawurlencode

The length sanity check should use this instead of urlencode()
see it is rawurlencode() that is actually used.

Change-Id: I5632e30c14c8ab27c8324c3e31311ca8bff7c162
---
M includes/libs/filebackend/SwiftFileBackend.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/392170/1

diff --git a/includes/libs/filebackend/SwiftFileBackend.php 
b/includes/libs/filebackend/SwiftFileBackend.php
index f50d26b..373ad93 100644
--- a/includes/libs/filebackend/SwiftFileBackend.php
+++ b/includes/libs/filebackend/SwiftFileBackend.php
@@ -158,7 +158,7 @@
        protected function resolveContainerPath( $container, $relStoragePath ) {
                if ( !mb_check_encoding( $relStoragePath, 'UTF-8' ) ) {
                        return null; // not UTF-8, makes it hard to use CF and 
the swift HTTP API
-               } elseif ( strlen( urlencode( $relStoragePath ) ) > 1024 ) {
+               } elseif ( strlen( rawurlencode( $relStoragePath ) ) > 1024 ) {
                        return null; // too long for Swift
                }
 

-- 
To view, visit https://gerrit.wikimedia.org/r/392170
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5632e30c14c8ab27c8324c3e31311ca8bff7c162
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to