summaryrefslogtreecommitdiffstats
path: root/netwerk/protocol/http/AlternateServices.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-07-20 13:59:45 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-07-20 13:59:45 +0200
commitaae0bfd5b8e4ac85d97cdce4a0fcd405f3160cd7 (patch)
tree5bbf3a9fe7b75d73d69e3020f47523e8f61b6333 /netwerk/protocol/http/AlternateServices.cpp
parent3f9e299b6ee9ec68eb41694703b939dab35e43a3 (diff)
downloadUXP-aae0bfd5b8e4ac85d97cdce4a0fcd405f3160cd7.tar
UXP-aae0bfd5b8e4ac85d97cdce4a0fcd405f3160cd7.tar.gz
UXP-aae0bfd5b8e4ac85d97cdce4a0fcd405f3160cd7.tar.lz
UXP-aae0bfd5b8e4ac85d97cdce4a0fcd405f3160cd7.tar.xz
UXP-aae0bfd5b8e4ac85d97cdce4a0fcd405f3160cd7.zip
Check port safety for AltSvc
Diffstat (limited to 'netwerk/protocol/http/AlternateServices.cpp')
-rw-r--r--netwerk/protocol/http/AlternateServices.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/netwerk/protocol/http/AlternateServices.cpp b/netwerk/protocol/http/AlternateServices.cpp
index ee2fa9331..10bd61928 100644
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -121,6 +121,11 @@ AltSvcMapping::ProcessHeader(const nsCString &buf, const nsCString &originScheme
continue;
}
+ if (NS_FAILED(NS_CheckPortSafety(portno, originScheme.get()))) {
+ LOG(("Alt Svc does not allow port %d, ignoring request", portno));
+ continue;
+ }
+
// unescape modifies a c string in place, so afterwards
// update nsCString length
nsUnescape(npnToken.BeginWriting());