The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/8124
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === Signed-off-by: Stéphane Graber <stgra...@ubuntu.com>
From a2b128ba369a101127cf2e3e0967b17a70ea8c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgra...@ubuntu.com> Date: Thu, 5 Nov 2020 19:30:32 -0500 Subject: [PATCH] lxd/rbac: Fix URL encoding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Graber <stgra...@ubuntu.com> --- lxd/rbac/server.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lxd/rbac/server.go b/lxd/rbac/server.go index 444882c097..4259c0fa8e 100644 --- a/lxd/rbac/server.go +++ b/lxd/rbac/server.go @@ -387,7 +387,10 @@ func (r *Server) syncAdmin(username string) bool { return false } - u.Path = path.Join(u.Path, fmt.Sprintf("api/service/v1/resources/lxd/permissions-for-user?u=%s", username)) + values := url.Values{} + values.Set("u", username) + u.RawQuery = values.Encode() + u.Path = path.Join(u.Path, "/api/service/v1/resources/lxd/permissions-for-user") req, err := http.NewRequest("GET", u.String(), nil) if err != nil { @@ -416,7 +419,10 @@ func (r *Server) syncPermissions(username string) error { return err } - u.Path = path.Join(u.Path, fmt.Sprintf("/api/service/v1/resources/project/permissions-for-user?u=%s", username)) + values := url.Values{} + values.Set("u", username) + u.RawQuery = values.Encode() + u.Path = path.Join(u.Path, "/api/service/v1/resources/project/permissions-for-user") req, err := http.NewRequest("GET", u.String(), nil) if err != nil {
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel