Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] User with empty password in client.yml does not work #374

Closed
cyqsimon opened this issue Aug 4, 2022 · 0 comments · Fixed by #434
Closed

[Bug] User with empty password in client.yml does not work #374

cyqsimon opened this issue Aug 4, 2022 · 0 comments · Fixed by #434

Comments

@cyqsimon
Copy link
Contributor

cyqsimon commented Aug 4, 2022

Description

Using ntfy CLI, when trying to subscribe to a topic as a user with an empty password, it seems impossible to do so from the config file client.yml. Things I tried all result in 403 forbidden authentication failures.

Steps to reproduce

  1. Set up a topic empty-password-test on the server with policy deny.
ntfy access everyone empty-password-test deny
  1. Add a user alice with empty password and read access to empty-password-test.
ntfy user add alice # provide empty password
ntfy access alice empty-password-test ro
  1. Run curl -u "alice:" -s http://my.domain.tld/empty-password-test/json, and observe that stream is opened successfully.
  • This verifies that the server has been set up correctly.
  1. Set this up in client.yml.
subscribe:
    - topic: "http://my.domain.tld/empty-password-test"
      command: 'notify-send "$m"'
      user: "alice"
      password: ""
  1. Run ntfy sub -C, and observe that authentication fails.
  2. Run ntfy sub -u "alice:" -C, and observe that with the username&password override, authentication no longer fails.

Miscellaneous

  • I tried password: ~, password: null, password: false, and omitting the password field altogether. None worked, although password: false produced 401 unauthorized instead of 403 forbidden.
  • Versions:
    • Linux x86_64 5.18.14, ntfy 1.27.2@69d6cdd, go 1.18.4
@cyqsimon cyqsimon changed the title User with empty password in client.yml does not work [Bug] User with empty password in client.yml does not work Aug 4, 2022
wunter8 added a commit to wunter8/ntfy that referenced this issue Oct 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant