From: Aaron Schulz Date: Fri, 17 Nov 2017 23:27:49 +0000 (-0800) Subject: SwiftFileBackend::resolveContainerPath() check the proper length X-Git-Tag: 1.31.0-rc.0~1471^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/supprimer.php?a=commitdiff_plain;h=205f4606af22fe1029e8699309ce30daf355b68d;p=lhc%2Fweb%2Fwiklou.git 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 --- 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 }