[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-60.7.0esr-9.0-1] Bug 1552993 - r=valentin, dragana



commit 4f998a1c15a84441d0f81eec59dc774ec5dc1127
Author: Gijs Kruitbosch <gijskruitbosch@xxxxxxxxx>
Date:   Mon May 27 09:14:33 2019 +0000

    Bug 1552993 - r=valentin,dragana
    
    Differential Revision: https://phabricator.services.mozilla.com/D32066
    
    --HG--
    extra : moz-landing-system : lando
---
 netwerk/protocol/http/AlternateServices.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/netwerk/protocol/http/AlternateServices.cpp b/netwerk/protocol/http/AlternateServices.cpp
index 2232d7cbf1a4..bebfc4c02bb7 100644
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -128,6 +128,11 @@ void AltSvcMapping::ProcessHeader(
       continue;
     }
 
+    if (NS_FAILED(NS_CheckPortSafety(portno, originScheme.get()))) {
+      LOG(("Alt Svc doesn't allow port %d, ignoring", portno));
+      continue;
+    }
+
     // unescape modifies a c string in place, so afterwards
     // update nsCString length
     nsUnescape(npnToken.BeginWriting());

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits