Skip to content

Commit

Permalink
Merge pull request #202 from ovotech/path-escape-token-prefix
Browse files Browse the repository at this point in the history
Path escape tokenPrefix
  • Loading branch information
eversC authored Jul 7, 2023
2 parents 8c0317f + 0a2a227 commit 72bc874
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions aiven.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"io"
"io/ioutil"
"net/http"
"net/url"
"strings"
"time"
)
Expand Down Expand Up @@ -220,6 +221,9 @@ func (a AivenKey) DeleteKey(project, account, keyID, token string) (err error) {
if err != nil {
return
}
// tokenPrefix is used in the path in the call to Aiven API, some chars
// need escaping otherwise they'll cause a 404
tokenPrefix = url.PathEscape(tokenPrefix)
rtr, err := revokeTokenResponse(tokenPrefix, token)
if err != nil {
return
Expand Down

0 comments on commit 72bc874

Please sign in to comment.