Skip to content

Commit

Permalink
initialize the metadata map to fix panic (#3075)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishoffman authored Jul 28, 2017
1 parent b5cabc2 commit de62505
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/credential/approle/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (b *backend) validateRoleID(s logical.Storage, roleID string) (*roleStorage

// Validates the supplied RoleID and SecretID
func (b *backend) validateCredentials(req *logical.Request, data *framework.FieldData) (*roleStorageEntry, string, map[string]string, error) {
var metadata map[string]string
metadata := make(map[string]string)
// RoleID must be supplied during every login
roleID := strings.TrimSpace(data.Get("role_id").(string))
if roleID == "" {
Expand Down

0 comments on commit de62505

Please sign in to comment.