Skip to content
This repository was archived by the owner on May 24, 2024. It is now read-only.

Commit 7dce850

Browse files
committed
Add url path escape
1 parent d10dd06 commit 7dce850

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

affiliation/identity.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func (a *Affiliation) GetProfileByUsername(username string, projectSlug string)
271271

272272
headers := make(map[string]string, 0)
273273
headers["Authorization"] = fmt.Sprintf("%s %s", "Bearer", token)
274-
endpoint := a.AffBaseURL + "/affiliation/" + projectSlug + "/get_profile_by_username/" + username
274+
endpoint := a.AffBaseURL + "/affiliation/" + url.PathEscape(projectSlug) + "/get_profile_by_username/" + url.PathEscape(username)
275275
_, res, err := a.httpClient.Request(strings.TrimSpace(endpoint), "GET", headers, nil, nil)
276276
if err != nil {
277277
log.Println("Repository: GetProfileByUsername: Could not get the profile: ", err)

0 commit comments

Comments
 (0)