Skip to content

Commit

Permalink
[CLOUDTRUST-2248] fixup regexp for realm_id param in account
Browse files Browse the repository at this point in the history
  • Loading branch information
harture committed Jan 30, 2020
1 parent 6849d50 commit 14a4b52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/account/api.go
Expand Up @@ -176,6 +176,7 @@ const (
RegExpIDNullable = `^([a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12})|(null)$`
RegExpLabel = `^.{0,255}$`
RegExpType = `^[a-zA-Z0-9-_]{1,128}$`
RegExpRealmName = `^[a-zA-Z0-9_-]{1,36}$`

// Password
RegExpPassword = `^.{1,255}$`
Expand Down
2 changes: 1 addition & 1 deletion pkg/account/http.go
Expand Up @@ -28,7 +28,7 @@ func decodeAccountRequest(ctx context.Context, req *http.Request) (interface{},
}

var queryParams = map[string]string{
"realm_id": account_api.RegExpID,
"realm_id": account_api.RegExpRealmName,
}

return commonhttp.DecodeRequest(ctx, req, pathParams, queryParams)
Expand Down

0 comments on commit 14a4b52

Please sign in to comment.