Improve regex for Well-Known URIs

Example to show the problem:
/Xwell-known/carddavXX
This commit is contained in:
Unrud 2015-12-22 12:44:19 +01:00
parent 53c3113b44
commit 7cb31fe22b

View File

@ -57,7 +57,7 @@ VERSION = "1.0.1"
# tries to access information they don't have rights to # tries to access information they don't have rights to
NOT_ALLOWED = (client.FORBIDDEN, {}, None) NOT_ALLOWED = (client.FORBIDDEN, {}, None)
WELL_KNOWN_RE = re.compile(r"/.well-known/(carddav|caldav)/?") WELL_KNOWN_RE = re.compile(r"/\.well-known/(carddav|caldav)/?$")
class HTTPServer(wsgiref.simple_server.WSGIServer, object): class HTTPServer(wsgiref.simple_server.WSGIServer, object):