Skip to content

Commit

Permalink
expose AccessKeyMinLen and MaxLen
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Sep 12, 2023
1 parent 01b911a commit e839dd2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion signature/signature-v4-parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func parseCredentialHeader(credElement string) (ch credentialHeader, err ErrorCo
},
}

if len(accessKey) < accessKeyMinLen {
if len(accessKey) < AccessKeyMinLen || len(accessKey) > AccessKeyMaxLen {
return ch, errInvalidAccessKeyID
}

Expand Down
4 changes: 2 additions & 2 deletions signature/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
)

const (
accessKeyMinLen = 3
// secretKeyMinLen = 8
AccessKeyMinLen = 16
AccessKeyMaxLen = 128
)

// check if the access key is valid and recognized, additionally
Expand Down

0 comments on commit e839dd2

Please sign in to comment.