ntfy: default-user and default-password in client.yml not working
I’ve created a file in ~/.config/ntfy/client.yml with this content
default-host: https://push.pablo.tools
default-user: pinpox
default-password: mysupersecretspassword
But the client seems to ingnore the values:
$ ntfy pub --config ~/.config/ntfy/client.yml https://push.pablo.tools/test
{"code":40301,"http":403,"error":"forbidden","link":"https://ntfy.sh/docs/publish/#authentication"}
Using the NTFY_USER
environment variable works, so I know the crendentials are in fact correct:
$ export NTFY_USER=pinpox:mysupersecretspassword
$ ntfy pub test test
{"id":"ix6JqNqNDETe","time":1667306079,"event":"message","topic":"test","message":"test"}
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 20 (11 by maintainers)
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-host
is ignored.Oh, you’re on Mac? I think the default path for
client.yml
on 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
My evil plan to collect user passwords is working 😈 – Just kidding. You’re right, I should look at this urgently.
I figured out what’s going on.
The code to use
default-user
anddefault-password
forntfy **sub**
was released in version 1.28.0.But the code to use
default-user
anddefault-password
forntfy **pub**
hasn’t been released yet. It’s included in (unreleased) version 1.29.0.Sorry about the (temporary) inconsistency!