Cosmetic changes
parent
e5e8003ee0
commit
9370acbcfe
|
@ -154,8 +154,7 @@ func execPublish(c *cli.Context) error {
|
||||||
}
|
}
|
||||||
if token != "" {
|
if token != "" {
|
||||||
options = append(options, client.WithBearerAuth(token))
|
options = append(options, client.WithBearerAuth(token))
|
||||||
} else {
|
} else if user != "" {
|
||||||
if user != "" {
|
|
||||||
var pass string
|
var pass string
|
||||||
parts := strings.SplitN(user, ":", 2)
|
parts := strings.SplitN(user, ":", 2)
|
||||||
if len(parts) == 2 {
|
if len(parts) == 2 {
|
||||||
|
@ -176,7 +175,6 @@ func execPublish(c *cli.Context) error {
|
||||||
} else if conf.DefaultUser != "" && conf.DefaultPassword != nil {
|
} else if conf.DefaultUser != "" && conf.DefaultPassword != nil {
|
||||||
options = append(options, client.WithBasicAuth(conf.DefaultUser, *conf.DefaultPassword))
|
options = append(options, client.WithBasicAuth(conf.DefaultUser, *conf.DefaultPassword))
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if pid > 0 {
|
if pid > 0 {
|
||||||
newMessage, err := waitForProcess(pid)
|
newMessage, err := waitForProcess(pid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
Binaries for all releases can be found on the GitHub releases pages for the [ntfy server](https://github.com/binwiederhier/ntfy/releases)
|
Binaries for all releases can be found on the GitHub releases pages for the [ntfy server](https://github.com/binwiederhier/ntfy/releases)
|
||||||
and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/releases).
|
and the [ntfy Android app](https://github.com/binwiederhier/ntfy-android/releases).
|
||||||
|
|
||||||
## ntfy server v2.1.3 (UNRELEASED)
|
## ntfy server v2.2.0 (UNRELEASED)
|
||||||
|
|
||||||
**Features:**
|
**Features:**
|
||||||
|
|
||||||
|
|
|
@ -1622,7 +1622,7 @@ func (s *Server) autorizeTopic(next handleFunc, perm user.Permission) handleFunc
|
||||||
// maybeAuthenticate reads the "Authorization" header and will try to authenticate the user
|
// maybeAuthenticate reads the "Authorization" header and will try to authenticate the user
|
||||||
// if it is set.
|
// if it is set.
|
||||||
//
|
//
|
||||||
// - If auth-db is not configured, immediately return an IP-based visitor
|
// - If auth-file is not configured, immediately return an IP-based visitor
|
||||||
// - If the header is not set or not supported (anything non-Basic and non-Bearer),
|
// - If the header is not set or not supported (anything non-Basic and non-Bearer),
|
||||||
// an IP-based visitor is returned
|
// an IP-based visitor is returned
|
||||||
// - If the header is set, authenticate will be called to check the username/password (Basic auth),
|
// - If the header is set, authenticate will be called to check the username/password (Basic auth),
|
||||||
|
|
Loading…
Reference in New Issue