fixes bug 302489 "XMLHTTP TRACE method can reveal proxy passwords to web sites" r=jst sr=dveditz a=asa

This commit is contained in:
darin%meer.net 2005-08-02 21:00:03 +00:00
parent 4c4e3b7839
commit 3a49d1d940

View File

@ -877,6 +877,11 @@ nsXMLHttpRequest::OpenRequest(const nsACString& method,
NS_ENSURE_ARG(!method.IsEmpty());
NS_ENSURE_ARG(!url.IsEmpty());
// Disallow HTTP/1.1 TRACE method (see bug 302489).
if (method.LowerCaseEqualsASCII("trace")) {
return NS_ERROR_INVALID_ARG;
}
nsresult rv;
nsCOMPtr<nsIURI> uri;
PRBool authp = PR_FALSE;