Don't allow cross-origin POST redirects on 308 codes.
This commit is contained in:
parent
9f4ed5d2ab
commit
058bc36d44
|
@ -1381,7 +1381,7 @@ nsPluginStreamListenerPeer::AsyncOnChannelRedirect(nsIChannel *oldChannel, nsICh
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// Don't allow cross-origin 307 POST redirects.
|
||||
// Don't allow cross-origin 307/308 POST redirects.
|
||||
nsCOMPtr<nsIHttpChannel> oldHttpChannel(do_QueryInterface(oldChannel));
|
||||
if (oldHttpChannel) {
|
||||
uint32_t responseStatus;
|
||||
|
@ -1389,7 +1389,7 @@ nsPluginStreamListenerPeer::AsyncOnChannelRedirect(nsIChannel *oldChannel, nsICh
|
|||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
if (responseStatus == 307) {
|
||||
if (responseStatus == 307 || responseStatus == 308) {
|
||||
nsAutoCString method;
|
||||
rv = oldHttpChannel->GetRequestMethod(method);
|
||||
if (NS_FAILED(rv)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user