diff options
| author | Eli Zaretskii | 2023-03-02 14:35:15 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2023-03-02 14:35:15 +0200 |
| commit | 1c7b2673bddc711abd032df5fbff38fc48aba16d (patch) | |
| tree | be6314c70aa9f59e7e0aca0d357233e352440a68 | |
| parent | 756225e37783a7b8fe73be1280c82f521e72d60f (diff) | |
| download | emacs-1c7b2673bddc711abd032df5fbff38fc48aba16d.tar.gz emacs-1c7b2673bddc711abd032df5fbff38fc48aba16d.zip | |
Avoid signaling errors in url-basic-auth when password is nil
* lisp/url/url-auth.el (url-basic-auth): Handle nil PASS.
Suggested by Ellis Kenyo <me@elken.dev>. (Bug#61411)
| -rw-r--r-- | lisp/url/url-auth.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/url/url-auth.el b/lisp/url/url-auth.el index e9ee72029f3..6848c0c73a7 100644 --- a/lisp/url/url-auth.el +++ b/lisp/url/url-auth.el | |||
| @@ -100,7 +100,10 @@ instead of the filename inheritance method." | |||
| 100 | (setq retval | 100 | (setq retval |
| 101 | (base64-encode-string | 101 | (base64-encode-string |
| 102 | (format "%s:%s" user | 102 | (format "%s:%s" user |
| 103 | (encode-coding-string pass 'utf-8)) | 103 | (if pass |
| 104 | (encode-coding-string pass | ||
| 105 | 'utf-8) | ||
| 106 | "")) | ||
| 104 | t)))) | 107 | t)))) |
| 105 | (symbol-value url-basic-auth-storage)))) | 108 | (symbol-value url-basic-auth-storage)))) |
| 106 | (byserv | 109 | (byserv |