389580 don't allow escaped null bytes in URLs for external protocol handlers

r=bzbarsky sr=dveditz
This commit is contained in:
cbiesinger%gmx.at 2007-07-26 04:04:21 +00:00
Родитель bc5a6b7f25
Коммит 3c8dc87baf
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -1214,6 +1214,9 @@ NS_IMETHODIMP nsExternalHelperAppService::LoadURI(nsIURI * aURL, nsIPrompt * aPr
nsCAutoString spec;
aURL->GetSpec(spec);
if (spec.Find("%00") != -1)
return NS_ERROR_MALFORMED_URI;
spec.ReplaceSubstring("\"", "%22");
spec.ReplaceSubstring("`", "%60");