зеркало из https://github.com/mozilla/gecko-dev.git
preliminary fix for bug 304904 [Firefox should refuse to look up invalid hostnames containing "%"], r=cbiesinger, sr=bzbarsky
This commit is contained in:
Родитель
06fed38c8f
Коммит
2fdb84ddb1
|
@ -21,6 +21,7 @@
|
|||
*
|
||||
* Contributor(s):
|
||||
* Darin Fisher (original author)
|
||||
* Andreas Otte
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
|
@ -576,7 +577,8 @@ nsAuthURLParser::ParseServerInfo(const char *serverinfo, PRInt32 serverinfoLen,
|
|||
colon = p;
|
||||
break;
|
||||
case ' ':
|
||||
// hostname must not contain a space
|
||||
case '%':
|
||||
// hostname must not contain a space or a %
|
||||
NS_WARNING("malformed hostname");
|
||||
return NS_ERROR_MALFORMED_URI;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче