mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
bug 290037 search action protocol should match method r=bengoodger,sr=dbaron,a=asa
This commit is contained in:
parent
5a30468926
commit
b4398cd40c
@ -2709,6 +2709,12 @@ InternetSearchDataSource::GetInternetSearchURL(const char *searchEngineURI,
|
||||
nsAutoString action, input, method, userVar, name;
|
||||
if (NS_FAILED(rv = GetData(dataUni, "search", 0, "action", action)))
|
||||
return(rv);
|
||||
|
||||
// Search only supports the http protocol
|
||||
if (!StringBeginsWith(action, NS_LITERAL_STRING("http:")) &&
|
||||
!StringBeginsWith(action, NS_LITERAL_STRING("https:")))
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
|
||||
if (NS_FAILED(rv = GetData(dataUni, "search", 0, "method", method)))
|
||||
return(rv);
|
||||
if (NS_FAILED(rv = GetData(dataUni, "search", 0, "name", name)))
|
||||
|
Loading…
Reference in New Issue
Block a user