mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #1451] Too long topic names are not accepted with 404 error #1023
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#1023
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 @rugk on GitHub (Sep 28, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1451
🐞 Describe the bug
I came here from fredy that can publish data on NTFY too. So the linked docs were: https://docs.ntfy.sh/publish/
I read:
As such, I generated 64 (URL safe) ASCII characters "password" (so as a API key kinda) and added some identificable stuff at the beginning…
However, if you do this, the server responds with a 404 error?
But:
💻 Components impacted
ntfy server
💡 Screenshots and/or logs
🔮 Additional context
Offtopic, but I can create a new issue about that if you want:
"the topic is essentially a password" should IMHO be a bigger warning (like GitHub's markdown warning block as I had to read the page a little more than needed to find that doc snippet. And it's important, because if this gets more popular I'd bet many people – in the worst case – use the default string mentioned in the docs .
to ease the UX even more and convince people this (= security) is actually a good idea, you cold even add a little generator for your topic URL that locally i the client (via JS), generates a topic like
topicname_somelonghash. Have a big button "generate topic name" and I guess this will easily lead to people using it.Also, this makes it easier for new users like me that first have to understand the doc what a "topic" actually is/refers to. As I came from that third-party application linking to you with a text like this, it may be a good idea to have it:
If you want to make it even better, you could create a separate page or even workflow for a "generate URL and return to third-party" (like OAuth) that simplifies the UX to simply pressing button to generate that and return it to the client.
@wunter8 commented on GitHub (Sep 29, 2025):
Topics are limited to 64 characters long (
github.com/binwiederhier/ntfy@7615aa86ad/server/server.go (L74))I couldn't quickly find that limit in the docs, so it would probably be good to add.
We could probably change the HTTP error to 414 instead of 404. I didn't know that one exists either.
The web app does have a "generate random topic" button already. It might be added to the mobile apps at some point
@rugk commented on GitHub (Sep 29, 2025):
Yeah, I mean 404 is totally wrong/incompatible, is not it? The topic is supposed to be created when accessed, so a response "does not exist" does not really make sense and does not explain what the error at all, is. I mean, after I first encountered this error, it was just my "programming intuition" that lead me to try a shorter URL/topic.
I mean the
messagealso really needs to be adjusted.Uhm sorry, where? At https://docs.ntfy.sh/publish/ I did not found that.
@wunter8 commented on GitHub (Sep 29, 2025):
The web app can be accessed here: https://ntfy.sh/app
When you subscribe to a new topic, you're presented with this dialog, which has the "generate name" button
@rugk commented on GitHub (Sep 29, 2025):
Ah well okay thx. As said for the docs this may alos be useful, but anyway is quite off-topic, so shall I open a new issue?
@wunter8 commented on GitHub (Sep 29, 2025):
Sure. Or if you find a good spot for this, you can just submit a PR adding it to the docs yourself
@rugk commented on GitHub (Sep 30, 2025):
It's unfortunately not as easy, because it's not a doc text change but a whole component so… But here: https://github.com/binwiederhier/ntfy/issues/1452