[PR #651] [MERGED] Fix publish command preferring default user instead of token auth #1365

Closed
opened 2026-05-07 01:01:46 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/binwiederhier/ntfy/pull/651
Author: @Xinayder
Created: 3/3/2023
Status: Merged
Merged: 3/3/2023
Merged by: @binwiederhier

Base: mainHead: fix-token-auth


📝 Commits (1)

  • 9d42ee9 Fix publish command preferring default user instead of token auth

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 cmd/publish.go (+1 -1)

📄 Description

As reported in #650, the publish command seems to prefer default-user and default-password config keys if they are defined in client.yml.

This PR aims to fix this problem, checking if the token isn't passed as a flag to the ntfy pub command before attempting to use the credentials stored in the client config file.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/binwiederhier/ntfy/pull/651 **Author:** [@Xinayder](https://github.com/Xinayder) **Created:** 3/3/2023 **Status:** ✅ Merged **Merged:** 3/3/2023 **Merged by:** [@binwiederhier](https://github.com/binwiederhier) **Base:** `main` ← **Head:** `fix-token-auth` --- ### 📝 Commits (1) - [`9d42ee9`](https://github.com/binwiederhier/ntfy/commit/9d42ee93915caded17703c1cc8ef1f5ea7541bac) Fix publish command preferring default user instead of token auth ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/publish.go` (+1 -1) </details> ### 📄 Description As reported in #650, the `publish` command seems to prefer `default-user` and `default-password` config keys if they are defined in `client.yml`. This PR aims to fix this problem, checking if the token isn't passed as a flag to the `ntfy pub` command before attempting to use the credentials stored in the client config file. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 01:01:46 +02:00
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/ntfy#1365
No description provided.