mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 431890: nsStandardURL::SetSpec does not fail when host contains leading space " ". r+sr=cbiesinger
This commit is contained in:
parent
e4c7e07942
commit
84837afd35
@ -495,6 +495,8 @@ nsStandardURL::BuildNormalizedSpec(const char *spec)
|
||||
Substring(spec + mHost.mPos, spec + mHost.mPos + mHost.mLen);
|
||||
if (tempHost.FindChar('\0') != kNotFound)
|
||||
return NS_ERROR_MALFORMED_URI; // null embedded in hostname
|
||||
if (tempHost.FindChar(' ') != kNotFound)
|
||||
return NS_ERROR_MALFORMED_URI; // don't allow spaces in the hostname
|
||||
if ((useEncHost = NormalizeIDN(tempHost, encHost)))
|
||||
approxLen += encHost.Length();
|
||||
else
|
||||
|
@ -15,10 +15,8 @@ function run_test() {
|
||||
catch (e) {
|
||||
success = e.result == Cr.NS_ERROR_MALFORMED_URI;
|
||||
}
|
||||
if (!success) {
|
||||
// This is failing: bug 431890
|
||||
//do_throw("We didn't throw NS_ERROR_MALFORMED_URI when a space was passed in the hostname!");
|
||||
}
|
||||
if (!success)
|
||||
do_throw("We didn't throw NS_ERROR_MALFORMED_URI when a space was passed in the hostname!");
|
||||
|
||||
success = false;
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user