summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@gmail.com>2018-08-04 06:18:06 +0200
committerGitHub <noreply@github.com>2018-08-04 06:18:06 +0200
commitc546de53113d5a903abc096ea3646ad6b9641fe6 (patch)
tree8363488ce02c5fba10dbafda598398bac151f831
parent3d5dbe3f75bd7d75958efcbd046e8c048faec0f2 (diff)
parent9e91804a7ac273816afe296c660025ecf9c79cde (diff)
downloadUXP-c546de53113d5a903abc096ea3646ad6b9641fe6.tar
UXP-c546de53113d5a903abc096ea3646ad6b9641fe6.tar.gz
UXP-c546de53113d5a903abc096ea3646ad6b9641fe6.tar.lz
UXP-c546de53113d5a903abc096ea3646ad6b9641fe6.tar.xz
UXP-c546de53113d5a903abc096ea3646ad6b9641fe6.zip
Merge pull request #690 from janekptacijarabaci/netwerk_cors_multiple_1
Fixed misleading console error message for multiple CORS headers
-rw-r--r--dom/locales/en-US/chrome/security/security.properties1
-rw-r--r--netwerk/protocol/http/nsCORSListenerProxy.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/dom/locales/en-US/chrome/security/security.properties b/dom/locales/en-US/chrome/security/security.properties
index c0b80996c..8efdb0a6d 100644
--- a/dom/locales/en-US/chrome/security/security.properties
+++ b/dom/locales/en-US/chrome/security/security.properties
@@ -8,6 +8,7 @@ BlockMixedActiveContent = Blocked loading mixed active content “%1$S”
CORSDisabled=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS disabled).
CORSRequestNotHttp=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS request not http).
CORSMissingAllowOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
+CORSMultipleAllowOriginNotAllowed=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: Multiple CORS headers ‘Access-Control-Allow-Origin’ not allowed).
CORSAllowOriginNotMatchingOrigin=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: CORS header ‘Access-Control-Allow-Origin’ does not match ‘%2$S’).
CORSNotSupportingCredentials=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at ‘%1$S’. (Reason: Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’).
CORSMethodNotFound=Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at %1$S. (Reason: Did not find method in CORS header ‘Access-Control-Allow-Methods’).
diff --git a/netwerk/protocol/http/nsCORSListenerProxy.cpp b/netwerk/protocol/http/nsCORSListenerProxy.cpp
index c2a624330..b9355c82b 100644
--- a/netwerk/protocol/http/nsCORSListenerProxy.cpp
+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
@@ -577,7 +577,7 @@ nsCORSListenerProxy::CheckRequestApproved(nsIRequest* aRequest)
// check for duplicate headers
rv = http->VisitOriginalResponseHeaders(visitor);
if (NS_FAILED(rv)) {
- LogBlockedRequest(aRequest, "CORSAllowOriginNotMatchingOrigin", nullptr);
+ LogBlockedRequest(aRequest, "CORSMultipleAllowOriginNotAllowed", nullptr);
return rv;
}