From d4672bfe79e4acc4f11e5908bc6da82aa0a094c4 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 15 Sep 2021 20:15:04 +0200 Subject: [PATCH] events: log parsed query string instead of just full path Signed-off-by: Jens Langhammer --- authentik/events/models.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/events/models.py b/authentik/events/models.py index f4326cbaf..ec2d4d63a 100644 --- a/authentik/events/models.py +++ b/authentik/events/models.py @@ -8,6 +8,7 @@ from uuid import uuid4 from django.conf import settings from django.db import models from django.http import HttpRequest +from django.http.request import QueryDict from django.utils.timezone import now from django.utils.translation import gettext as _ from requests import RequestException @@ -139,8 +140,9 @@ class Event(ExpiringModel): `user` arguments optionally overrides user from requests.""" if request: self.context["http_request"] = { - "path": request.get_full_path(), + "path": request.path, "method": request.method, + "args": QueryDict(request.META.get("QUERY_STRING", "")), } if hasattr(request, "tenant"): tenant: Tenant = request.tenant