Skip to content

Commit

Permalink
fix: use PathEscape instead of QueryEscape
Browse files Browse the repository at this point in the history
I believe that is the intention - replace `/` to avoid mismatches on
prefixes.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Sep 14, 2022
1 parent b6c761b commit 7e8fa26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/state/impl/etcd/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func (st *State) etcdKeyFromPointer(pointer resource.Pointer) string {

// etcdKeyPrefixFromKind returns a key prefix for the given resource kind.
func (st *State) etcdKeyPrefixFromKind(kind resource.Kind) string {
nsEscaped := url.QueryEscape(kind.Namespace())
typeEscaped := url.QueryEscape(kind.Type())
nsEscaped := url.PathEscape(kind.Namespace())
typeEscaped := url.PathEscape(kind.Type())

return st.keyPrefix + "/" + nsEscaped + "/" + typeEscaped + "/"
}
Expand Down

0 comments on commit 7e8fa26

Please sign in to comment.