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

gk at torproject.org gk at torproject.org
Wed Jul 3 09:08:51 UTC 2019


commit 40a9182ba78975d5b5d4b0125cb8fbfc66afe3f0
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 tbb-commits mailing list