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

gk at torproject.org gk at torproject.org
Mon Jun 3 10:48:41 UTC 2019


commit 4f998a1c15a84441d0f81eec59dc774ec5dc1127
Author: Gijs Kruitbosch <gijskruitbosch at gmail.com>
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());



More information about the tor-commits mailing list