Skip to content

Commit

Permalink
ghub--auth: don't add newline to base64 encoded credentials
Browse files Browse the repository at this point in the history
base64-encode-string may insert newlines in the resulting string.
This will confuse the web server and cause the authentication to fail.
The optional parameter no-line-break prevents this.
  • Loading branch information
kuehnelth authored and tarsius committed Oct 16, 2020
1 parent 0adc457 commit e1ef7f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ghub.el
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,8 @@ and call `auth-source-forget+'."
(concat "Basic "
(base64-encode-string
(concat username ":"
(ghub--token host username auth nil forge))))
(ghub--token host username auth nil forge))
t))
(concat
(and (not (eq forge 'gitlab)) "token ")
(encode-coding-string
Expand Down

0 comments on commit e1ef7f0

Please sign in to comment.