Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F11802
bug-52746.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 22 2014, 2:07 AM
2014-11-22 02:07:46 (UTC+0)
Size
963 B
Referenced Files
None
Subscribers
None
bug-52746.patch
View Options
diff --git a/includes/libs/IEUrlExtension.php b/includes/libs/IEUrlExtension.php
index 79387e6..49d05d4 100644
--- a/includes/libs/IEUrlExtension.php
+++ b/includes/libs/IEUrlExtension.php
@@ -232,7 +232,7 @@ class IEUrlExtension {
}
// We found an illegal character or another dot
// Skip to that character and continue the loop
- $pos = $nextPos + 1;
+ $pos = $nextPos;
$remainingLength = $urlLength - $pos;
}
return false;
diff --git a/tests/phpunit/includes/libs/IEUrlExtensionTest.php b/tests/phpunit/includes/libs/IEUrlExtensionTest.php
index 984907b..d04dd7d 100644
--- a/tests/phpunit/includes/libs/IEUrlExtensionTest.php
+++ b/tests/phpunit/includes/libs/IEUrlExtensionTest.php
@@ -115,4 +115,12 @@ class IEUrlExtensionTest extends MediaWikiTestCase {
'Dot at end of string'
);
}
+
+ function testTwoDots() {
+ $this->assertEquals(
+ 'z',
+ IEUrlExtension::findIE6Extension( 'x.y.z' ),
+ 'Two dots'
+ );
+ }
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
11261
Default Alt Text
bug-52746.patch (963 B)
Attached To
Mode
T54746: XSS in MediaWiki API (through invalid property name) reintroduced in 1.21.1
Attached
Detach File
Event Timeline
Log In to Comment