jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/392170 )

Change subject: SwiftFileBackend::resolveContainerPath() check the proper length
......................................................................


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
---
M includes/libs/filebackend/SwiftFileBackend.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



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: merged
Gerrit-Change-Id: I5632e30c14c8ab27c8324c3e31311ca8bff7c162
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <asch...@wikimedia.org>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to