From 5ce114c2e196bc4a0cf57673aedf148b5666acbe Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 19 Aug 2019 23:35:14 +0200 Subject: [PATCH] Try to verify authenticated fetches --- app.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app.py b/app.py index 2df4049..38924f9 100644 --- a/app.py +++ b/app.py @@ -210,6 +210,13 @@ def _log_sig(): sig = request.headers.get("Signature") if sig: app.logger.info(f"received an authenticated fetch: {sig}") + try: + req_verified, actor_id = verify_request( + request.method, request.path, request.headers, None + ) + app.logger.info(f"authenticated fetch: {req_verified}: {actor_id}") + except Exception: + app.logger.exception("failed to verify authenticated fetch") # App routes