Selaa lähdekoodia

web: don't echo back invalid service names

This prevents potential XSS attacks, which could have injected
arbitrary content under a domain by echoing back the unsupported
service name.
Dave Borowitz 12 vuotta sitten
vanhempi
commit
290a16c8ee
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      dulwich/web.py

+ 1 - 1
dulwich/web.py

@@ -166,7 +166,7 @@ def get_info_refs(req, backend, mat):
     if service and not req.dumb:
         handler_cls = req.handlers.get(service, None)
         if handler_cls is None:
-            yield req.forbidden('Unsupported service %s' % service)
+            yield req.forbidden('Unsupported service')
             return
         req.nocache()
         write = req.respond(HTTP_OK, 'application/x-%s-advertisement' % service)