Skip to content

Commit

Permalink
Merge branch 'main' into changelog/update-0.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
fairclothjm authored Oct 14, 2024
2 parents 225d0da + 90e07b9 commit 01492eb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Unreleased

BUG FIXES:

* fix a panic on static role creation when the config is unset (https://github.com/hashicorp/vault-plugin-secrets-openldap/pull/119)

## v0.14.1

BUG FIXES:
Expand Down
7 changes: 5 additions & 2 deletions path_static_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package openldap

import (
"context"
"errors"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -318,8 +317,12 @@ func (b *backend) pathStaticRoleCreateUpdate(ctx context.Context, req *logical.R
// otherwise, go get it if this is a create request.
c, err := readConfig(ctx, req.Storage)
if err != nil {
return nil, errors.New("couldn't find configuration for this create operation's endpoint")
return nil, err
}
if c == nil {
return logical.ErrorResponse("missing LDAP configuration"), nil
}

skipRotation = c.SkipStaticRoleImportRotation
}

Expand Down

0 comments on commit 01492eb

Please sign in to comment.