mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 16:35:53 +02:00
[GH-ISSUE #204] Web app: validate server URLs #160
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#160
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 @cmeis on GitHub (Apr 8, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/204
As in issue #193 for the Android app, the web app doesn't do any validation on the server url for user accounts (apart from it having to be at least one character long ;-) ). See screenshot:

Needs proper input validation for the URL.
@binwiederhier commented on GitHub (Apr 8, 2022):
Indeed. 😱
Good catch.
@binwiederhier commented on GitHub (Apr 8, 2022):
There isn't really much validation I can do apart from just checking that it starts with
https?://-- If I was gonna get fancy, I could make an endpoint to check that the server is a valid ntfy server, but that's not really worth it, so I think I'll stick with the http/s-chekc@cmeis commented on GitHub (Apr 9, 2022):
Well you could validate the host a bit more, like:
Perhaps something like https://www.npmjs.com/package/is-valid-hostname
@binwiederhier commented on GitHub (Apr 9, 2022):
is-valid-hostname reminded me of the
left-paddebacle. I generally try to keep dependencies out as much as possible (though that's hard to do in the JS world). But hostname checking doesn't have to be that strict. If it's wrong, stuff will not work and you'll fix it. :-DI think I'm alright with just checking for http://..
@cmeis commented on GitHub (Apr 9, 2022):
Tell me about dependency hell..... I'm fine with fixing my own sh*t 😉
@binwiederhier commented on GitHub (Apr 10, 2022):
This is done and will be in the next release. Just basic URL validation