Skip to content

Commit

Permalink
Inserted auth-key whitespace stripping after ReadFile
Browse files Browse the repository at this point in the history
Lines in POSIX compliant text files often end with a LF (linefeed char)
This unfortunately causes the auth key decoder to die with err msg "Unknown character U+000A"
  • Loading branch information
Johan Thomsen authored and cbroglie committed Aug 16, 2018
1 parent 80d5f5b commit 7e13f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func New(key string, ad []byte) (*Standard, error) {
if err != nil {
return nil, err
}
key = string(data)
key = strings.TrimSpace(string(data))
default:
return nil, fmt.Errorf("unknown key prefix: %s", splitKey[0])
}
Expand Down

0 comments on commit 7e13f60

Please sign in to comment.