Revert "Add extra check for path traversal sanity."

This reverts commit 41bd3e2599696771485c9dc75a7e27b94c0597fb.
This commit is contained in:
wolfbeast 2018-03-18 02:32:48 +01:00 committed by Roy Tam
commit 869e2c87e5

View file

@ -238,12 +238,6 @@ nsChromeRegistry::Canonify(nsIURL* aChromeURL)
// path is already unescaped once, but uris can get unescaped twice
const char* pos = path.BeginReading();
const char* end = path.EndReading();
// Must start with [a-zA-Z0-9].
if (!('a' <= *pos && *pos <= 'z') &&
!('A' <= *pos && *pos <= 'Z') &&
!('0' <= *pos && *pos <= '9')) {
return NS_ERROR_DOM_BAD_URI;
}
while (pos < end) {
switch (*pos) {
case ':':