Skip to content

Commit

Permalink
Merge pull request #1 from freenowtech/fix-error-decoding-length
Browse files Browse the repository at this point in the history
Fix failing decode of credentials
  • Loading branch information
cpuguy83 authored Aug 5, 2021
2 parents a40e471 + e334609 commit 3ee4ae1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ func DecodeBase64Auth(auth AuthConfig) (string, string, error) {
return "", "", fmt.Errorf("error decoding auth from file: %w", err)
}

if n != decLen {
return "", "", fmt.Errorf("decoded value does not match expected length, expected: %d, actual: %d", decLen, n)
if n > decLen {
return "", "", fmt.Errorf("decoded value is longer than expected length, expected: %d, actual: %d", decLen, n)
}

split := strings.SplitN(string(decoded), ":", 2)
Expand Down

0 comments on commit 3ee4ae1

Please sign in to comment.