NTFY Broken #1457

Closed
opened 2026-02-28 02:21:50 -05:00 by deekerman · 4 comments
Owner

Originally created by @adammckay on GitHub (Oct 6, 2022).

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn't find similar issue

🛡️ 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

Originally created by @adammckay on GitHub (Oct 6, 2022). ### ⚠️ Please verify that this bug has NOT been raised before. - [X] I checked and didn't find similar issue ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/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_
deekerman 2026-02-28 02:21:50 -05:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@Apashh commented on GitHub (Oct 6, 2022):

Hey, I have the same problem, and also, the notification is broken. :(
When POST, we have this :
image

@Apashh commented on GitHub (Oct 6, 2022): Hey, I have the same problem, and also, the notification is broken. :( When POST, we have this : ![image](https://user-images.githubusercontent.com/83477029/194329290-29920a5b-371d-4a7b-8015-8ca833ece5c2.png)
Author
Owner

@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)

@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. https://github.com/louislam/uptime-kuma/blob/c28d8ddff9342da501e60df23cbb79e3259a4306/server/notification-providers/ntfy.js#L12-L14
Author
Owner

@Apashh commented on GitHub (Oct 6, 2022):

Ok nice, and for the notification template ? How correct this ? ;)

@Apashh commented on GitHub (Oct 6, 2022): Ok nice, and for the notification template ? How correct this ? ;)
Author
Owner

@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.

@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.
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/uptime-kuma#1457
No description provided.