mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #460] default-user and default-password in client.yml not working #353
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#353
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 @pinpox on GitHub (Nov 1, 2022).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/460
I've created a file in ~/.config/ntfy/client.yml with this content
But the client seems to ingnore the values:
Using the
NTFY_USERenvironment variable works, so I know the crendentials are in fact correct:@binwiederhier commented on GitHub (Nov 2, 2022):
So I looked at the code and it should work. I'll try this out. 🤔
@notDavid commented on GitHub (Nov 10, 2022):
Note that this leaks/publishes notifications send to a private instance with the 'ntfy cli', to the public instance at
https://ntfy.sh/*, because the configureddefault-hostis ignored.@binwiederhier commented on GitHub (Nov 11, 2022):
My evil plan to collect user passwords is working 😈 -- Just kidding. You're right, I should look at this urgently.
@wunter8 commented on GitHub (Nov 12, 2022):
@notDavid Can you confirm notifications are being leaked? I just tested it locally, and it seems like
default-hostis being used correctly. I think onlydefault-useranddefault-passwordare being ignored@wunter8 commented on GitHub (Nov 12, 2022):
I figured out what's going on.
The code to use
default-useranddefault-passwordforntfy **sub**was released in version 1.28.0.But the code to use
default-useranddefault-passwordforntfy **pub**hasn't been released yet. It's included in (unreleased) version 1.29.0.Sorry about the (temporary) inconsistency!
@binwiederhier commented on GitHub (Nov 12, 2022):
As per @wunter8's comment, this was fixed in #431. I'm going to release the code today.
@notDavid commented on GitHub (Nov 12, 2022):
Glad you found it :-)
I don't fully understand by the way, in particular why the setting
default-hostdoes not work either...? But if you say it will be fixed it's fine! 🤗@notDavid commented on GitHub (Nov 12, 2022):
For the record, this gets send to ntfy.sh instead of my own server:
@wunter8 commented on GitHub (Nov 12, 2022):
Can you confirm what version of
ntfyyou're using? (ntfy -h | tail -n2)@notDavid commented on GitHub (Nov 12, 2022):
@wunter8 commented on GitHub (Nov 12, 2022):
What happens when you subscribe to a topic? Does it use the configured
default-host? (ntfy sub --trace mytopic)@notDavid commented on GitHub (Nov 12, 2022):
@wunter8 commented on GitHub (Nov 12, 2022):
Alright. Now let's check file permissions:
ls -al ~/.config/ntfy/client.yml@notDavid commented on GitHub (Nov 12, 2022):
@wunter8 commented on GitHub (Nov 12, 2022):
Oh, you're on Mac? I think the default path for
client.ymlon MacOS is~/Library/Application Support/ntfy/client.yml. So you could either move your config file there, or specify the path to the config file in the command:ntfy sub --trace --config ~/.config/ntfy/client.yml mytopic@binwiederhier commented on GitHub (Nov 12, 2022):
(I just released the v1.29.0, so you should also try that.)
@notDavid commented on GitHub (Nov 12, 2022):
@wunter8 Ahhhh yes that works. Thank you, and sorry for the confusion, i did not realize... 🫣
@binwiederhier Yes, 1.29.9 is working also with the username/password :-)
@notDavid commented on GitHub (Nov 12, 2022):
@wunter8 fyi, I followed the docs here, which is why i put the config file in that location: https://ntfy.sh/docs/subscribe/cli/#install-configure
Perhaps it's a good idea to update that, might save you some time in the future :-)
@wunter8 commented on GitHub (Nov 12, 2022):
I found the default path for MacOS here: https://ntfy.sh/docs/subscribe/cli/#subscribe-to-multiple-topics
But I agree we should probably update the docs elsewhere
@notDavid commented on GitHub (Nov 13, 2022):
@wunter8 By the way, wouldn't it make more sense to change this to
~/.config/ntfy/client.yml, where all other dot files are?I don't have a single commandline tool which puts their dot files in
~/Library/Application Support/...