Skip to content

Commit

Permalink
enclave: fix bug in enclave name query parameter construction
Browse files Browse the repository at this point in the history
This commit fixes a bug when constructing the URL containg
an enclave as query paramater.
Before, the URL API path got overwritten with the URL query
parameter. For example:
```
/v1/key/create/my-key?enclacve=my-enclave
```
would have been overwritten to:

```
?enclacve=my-enclave
```

Signed-off-by: Andreas Auernhammer <[email protected]>
  • Loading branch information
aead committed Nov 21, 2022
1 parent 6b666c9 commit 4e7b9e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion enclave.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ func (e *Enclave) path(api string, args ...string) string {
api = path.Join(api, url.PathEscape(arg))
}
if e.Name != "" {
api = "?enclave=" + url.QueryEscape(e.Name)
api += "?enclave=" + url.QueryEscape(e.Name)
}
return api
}

0 comments on commit 4e7b9e5

Please sign in to comment.