Skip to content

Commit

Permalink
Remove api_key query param to recover signature correctly (#8579)
Browse files Browse the repository at this point in the history
Co-authored-by: Saliou Diallo <saliou@audius.co>
  • Loading branch information
sddioulde and Saliou Diallo authored May 21, 2024
1 parent f531fb1 commit ba268e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comms/discovery/server/signed_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,11 @@ func userIdForSignedGet(c echo.Context) (int32, error) {
return logError(errors.New("timestamp not current"))
}

// Strip out the app_name query parameter to get the true signature payload
// Strip out the app_name and api_key query parameters to get the true signature payload
u := *c.Request().URL
q := u.Query()
q.Del("app_name")
q.Del("api_key")
q.Del("signature")
u.RawQuery = q.Encode()
payload := []byte(u.String())
Expand Down

0 comments on commit ba268e3

Please sign in to comment.