mirror of
https://github.com/louislam/uptime-kuma.git
synced 2026-03-02 22:57:00 -05:00
NTFY Broken #1457
Labels
No labels
A:accessibility
A:api
A:cert-expiry
A:core
A:dashboard
A:deployment
A:documentation
A:domain expiry
A:incidents
A:maintenance
A:metrics
A:monitor
A:notifications
A:reports
A:settings
A:status-page
A:ui/ux
A:user-management
Stale
ai-slop
blocked
blocked-upstream
bug
cannot-reproduce
dependencies
discussion
duplicate
feature-request
feature-request
good first issue
hacktoberfest
help
help wanted
house keeping
invalid
invalid-format
invalid-format
question
releaseblocker 🚨
security
spam
type:enhance-existing
type:new
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/uptime-kuma#1457
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 @adammckay on GitHub (Oct 6, 2022).
⚠️ Please verify that this bug has NOT been raised before.
🛡️ Security Policy
Description
The username and password fields for NTFY notifications are supposed to be optional. This is because (I believe) you will only ever have those credentials if you host your own server. If you're using http://ntfy.sh, there will never be a username / password.
At any rate, the form for setting up a NTFY notification clearly says 'optional' next to the username / password field. But the form never saves unless you fill them in with something. This in turn means I can never save an NTFY notification.
Also - I will not get a successful test unless I fill in the username and then blank it out. I will get an error on the length of the username field until I enter something and then clear it.
👟 Reproduction steps
Create an ntfy notification. DO NOT put your cursor in the username field. Click TEST. You will get an error on the length of the username. Now enter something for the username. Clear what you just entered. Click TEST. You will now have a successful test. Now click SAVE. You will not be able to save because the username field is empty.
👀 Expected behavior
If nothing is entered for username, it should be fine because the field is optional. The TEST and SAVE buttons should still work whether username/password are filled in or not.
😓 Actual Behavior
You are never able to successfully save an NTFY notification unless you host your own server and create topics with a username / password.
🐻 Uptime-Kuma Version
1.18.1
💻 Operating System and Arch
Debian (official docker image)
🌐 Browser
Chrome, Edge
🐋 Docker Version
20.10.18
🟩 NodeJS Version
No response
📝 Relevant log output
No response
@Apashh commented on GitHub (Oct 6, 2022):
Hey, I have the same problem, and also, the notification is broken. :(

When POST, we have this :
@louislam commented on GitHub (Oct 6, 2022):
I think the error caused by this, calling length on null/undefined. I will quickly release 1.8.3.
github.com/louislam/uptime-kuma@c28d8ddff9/server/notification-providers/ntfy.js (L12-L14)@Apashh commented on GitHub (Oct 6, 2022):
Ok nice, and for the notification template ? How correct this ? ;)
@adammckay commented on GitHub (Oct 7, 2022):
I have upgraded to 1.18.3. Unfortunately, ntfy alerts still can't be saved because the username / password fields are still not optional. You did correct the other problem.