Skip to content

Commit 09064db

Browse files
heschigopherbot
authored andcommitted
cmd/relui: fix website upload username
Unlike the coordinator, the website doesn't want the user- prefix on the username. For golang/go#51797. Change-Id: I169bdf1dd8ffd7cad6fccb2cf752be4271efe094 Reviewed-on: https://go-review.googlesource.com/c/build/+/411063 Reviewed-by: Dmitri Shuralyov <[email protected]> Auto-Submit: Heschi Kreinick <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Heschi Kreinick <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 9324a76 commit 09064db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/relui/main.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"math/rand"
2020
"net/http"
2121
"net/url"
22+
"strings"
2223
"time"
2324

2425
"cloud.google.com/go/storage"
@@ -182,7 +183,7 @@ func publishFile(uploadURL string, auth buildlet.UserPass, f *relui.WebsiteFile)
182183
if err != nil {
183184
return fmt.Errorf("invalid website upload URL %q: %v", *websiteUploadURL, err)
184185
}
185-
u.Query().Set("user", auth.Username)
186+
u.Query().Set("user", strings.TrimPrefix("user-", auth.Username))
186187
u.Query().Set("key", auth.Password)
187188
resp, err := http.Post(u.String(), "application/json", bytes.NewReader(req))
188189
if err != nil {

0 commit comments

Comments
 (0)