From 8e2406caa48a0e20f5be189b9ba235c622887c93 Mon Sep 17 00:00:00 2001 From: Ryan Barrett Date: Sun, 1 Oct 2017 07:00:32 -0700 Subject: [PATCH] add_webmention: unquote input URL --- add_webmention.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/add_webmention.py b/add_webmention.py index 2756d47..794a306 100644 --- a/add_webmention.py +++ b/add_webmention.py @@ -1,6 +1,7 @@ """HTTP proxy that injects our webmention endpoint. """ import logging +import urllib import appengine_config @@ -16,6 +17,7 @@ class AddWebmentionHandler(webapp2.RequestHandler): """Proxies HTTP requests and adds Link header to our webmention endpoint.""" def get(self, url): + url = urllib.unquote(url) if not url.startswith('http://') and not url.startswith('https://'): self.abort(400, 'URL must start with http:// or https://')