From 205f4606af22fe1029e8699309ce30daf355b68d Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 17 Nov 2017 15:27:49 -0800 Subject: [PATCH] SwiftFileBackend::resolveContainerPath() check the proper length The length sanity check should use this instead of urlencode() see it is rawurlencode() that is actually used. Change-Id: I5632e30c14c8ab27c8324c3e31311ca8bff7c162 --- includes/libs/filebackend/SwiftFileBackend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/libs/filebackend/SwiftFileBackend.php b/includes/libs/filebackend/SwiftFileBackend.php index f50d26b465..373ad93a34 100644 --- a/includes/libs/filebackend/SwiftFileBackend.php +++ b/includes/libs/filebackend/SwiftFileBackend.php @@ -158,7 +158,7 @@ class SwiftFileBackend extends FileBackendStore { 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 } -- 2.20.1