Merge "SwiftFileBackend::resolveContainerPath() check the proper length"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 18 Nov 2017 02:08:27 +0000 (02:08 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 18 Nov 2017 02:08:27 +0000 (02:08 +0000)
includes/libs/filebackend/SwiftFileBackend.php

index f50d26b..373ad93 100644 (file)
@@ -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
                }