User API keys: payload and existing query string leads to a double question mark

If I call user-api-key/new with an auth_redirect already containing a query string (e.g. http://localhost:30120/auth-discourse?state=BASE64), I end up with a redirect URI along the likes of http://localhost:30120/auth-discourse?state=BASE64?payload=PAYLOAD - two query strings, and no & appending.

This code might need to be changed to check if there’s already a query string in the URI, or perhaps use some URI builder?

1개의 좋아요

It does seem like the assumption the code makes is that it doesn’t already contain any query parameters. We’d be open to a PR to fix this.

4개의 좋아요

I have opened PR for this issue here:
https://github.com/discourse/discourse/pull/7923

3개의 좋아요

PR has been merged. This topic can be closed :smile:

2개의 좋아요