From da4ae3ff24fd958a09f54db706f883426e507c74 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 5 May 2022 12:29:30 -0700 Subject: [PATCH] log-search: Filter out user avatars. --- scripts/log-search | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/log-search b/scripts/log-search index 583ee1dd88..d684f4ad44 100755 --- a/scripts/log-search +++ b/scripts/log-search @@ -57,6 +57,7 @@ def parser() -> argparse.ArgumentParser: ) filtering.add_argument("--static", "-s", help="Include static file paths", action="store_true") filtering.add_argument("--uploads", "-u", help="Include file upload paths", action="store_true") + filtering.add_argument("--avatars", "-a", help="Include avatar paths", action="store_true") filtering.add_argument("--events", "-e", help="Include event fetch paths", action="store_true") filtering.add_argument("--messages", "-m", help="Include message paths", action="store_true") filtering.add_argument( @@ -255,6 +256,8 @@ def passes_filters( return False if path.startswith("/user_uploads/") and not args.uploads: return False + if path.startswith(("/user_avatars/", "/avatar/")) and not args.avatars: + return False if re.match(r"/(json|api/v1)/events($|\?|/)", path) and not args.events: return False if path in ("/api/v1/typing", "/json/typing") and not args.typing: