[GH-ISSUE #442] base url prefix check is case sensitive #339

Closed
opened 2026-05-07 00:23:14 +02:00 by BreizhHardware · 1 comment

Originally created by @theEndBeta on GitHub (Oct 16, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/442

I had my base url with capitalized letters (no real reason for this other than I wanted to), but the push key prefix was using all lower case.
As far as I am aware, url handling should be case insensitive.

I believe that the error is resulting from:
github.com/binwiederhier/ntfy@5b8372d260/server/server_matrix.go (L125-L127)

The error I saw in the TRACE logs was:

push key must be prefixed with base URL, received push key: https://ntfy.myniceurl.com/<id>?up=1, configured base URL: https://ntfy.myNiceUrl.com
Originally created by @theEndBeta on GitHub (Oct 16, 2022). Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/442 I had my base url with capitalized letters (no real reason for this other than I wanted to), but the push key prefix was using all lower case. As far as I am aware, url handling should be case insensitive. I believe that the error is resulting from: https://github.com/binwiederhier/ntfy/blob/5b8372d260435f3b1e8198ec9c6f1eb2a2ace780/server/server_matrix.go#L125-L127 The error I saw in the `TRACE` logs was: ```default push key must be prefixed with base URL, received push key: https://ntfy.myniceurl.com/<id>?up=1, configured base URL: https://ntfy.myNiceUrl.com ```
Author
Owner

@binwiederhier commented on GitHub (Oct 20, 2022):

While it is true that domains are technically case in-senstitive, it is also extremely uncommon to uppercase any part of a domain. So while I thank you for bringing this to my attention, I don't think I want to fix this. It seems like unnecessary code and it can be easily fixed because the error message is clear enough.

<!-- gh-comment-id:1285373873 --> @binwiederhier commented on GitHub (Oct 20, 2022): While it is true that domains are technically case in-senstitive, it is also extremely uncommon to uppercase any part of a domain. So while I thank you for bringing this to my attention, I don't think I want to fix this. It seems like unnecessary code and it can be easily fixed because the error message is clear enough.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ntfy#339
No description provided.