mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #577] The nginx configuration(and the one used by ntfy.sh) leaks topic name/auth query in logs #437
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#437
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MaeIsBad on GitHub (Jan 8, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/577
In
github.com/binwiederhier/ntfy-ansible@eaa9b7c7ee/roles/nginx/files/nginx.conf (L48)log_format includes $request which contains the request path, which in turn leaks topic names.This is mitigated with the use of http basic auth, but in the case of authentication via a query parameter the credentials are also logged.
It's is not a huge issue, but potentially could end up quite bad if someone is able to see the log(via LFI? An admin accidentally forgetting they were screensharing? Idk), so maybe it's worth fixing?
The docs for setting up a reverse proxy in front of ntfy(https://docs.ntfy.sh/config/?h=nginx#nginxapache2caddy) don't explicitly set the log format themselves, but the default configuration used by most linux distributions will include the $request param
@binwiederhier commented on GitHub (Mar 26, 2023):
I understand that this seems like a security concern to you, but the fact of the matter is that for debugging purposes I need to be able to group by topic to diagnose issues. The ntfy log is even more detailed when debug/trace is enabled. I will not ever betray people's trust and share the topic names or message content. If people are uncomfortable with that (which I totally understand), they can always set up their own server.
That said, I think I'd be absolutely fine with somehow censoring the
authparam somehow. I'm happy to accept PRs or suggestions.@MaeIsBad commented on GitHub (Mar 27, 2023):
As mentioned I don't think this is a huge problem, just something I thought was worth documenting even as an issue.
I'll look into redacting auth params in nginx logs in my spare time
Thanks for ntfy 😃