Skip to content

Commit 4a22d7b

Browse files
author
Aaron Schlesinger
committed
fix(storage_creds.go): strip leading and trailing spaces from credentials
1 parent 8af96b7 commit 4a22d7b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

pkg/gitreceive/storage_creds.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ func getStorageCreds() (*storageCreds, error) {
3636
if accessKeyErr == nil && accessSecretKeyErr != nil {
3737
return nil, errMissingSecret
3838
}
39-
return &storageCreds{
40-
key: string(accessKeyIDBytes),
41-
secret: string(accessSecretKeyBytes),
42-
}, nil
39+
accessKeyID = strings.TrimSpace(string(accessKeyIDBytes))
40+
accessSecretKey = strings.TrimSpace(string(accessSecretKeyBytes))
41+
return &storageCreds{key: accessKeyID, secret: accessSecretKey}, nil
4342
}

0 commit comments

Comments
 (0)