bug 379314 clarify moz-icon checks, r=timeless

This commit is contained in:
dveditz%cruzio.com 2007-07-12 09:27:49 +00:00
Родитель efef992a97
Коммит a33f7deda5
1 изменённых файлов: 7 добавлений и 2 удалений

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

@ -307,8 +307,13 @@ nsMozIconURI::SetSpec(const nsACString &aSpec)
{ {
nsCAutoString filespec; nsCAutoString filespec;
tmpURI->GetSpec(filespec); tmpURI->GetSpec(filespec);
if (filespec.Length() > 8 && filespec.CharAt(8) != '/') if ( strncmp("file:////", filespec.get(), 9) &&
mFileIcon = tmpURI; // looks good, save the file (bug 376328) strncmp("file:///%", filespec.get(), 9) )
{
// accept only local files; disallow UNC paths (bug 376328)
// and attempts to escape them (bug 386998)
mFileIcon = tmpURI;
}
} }
} }
if (!sizeString.IsEmpty()) if (!sizeString.IsEmpty())