Use urlencode for building Discourse redirect URL
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d8f5a7f77c
commit
b95ce03030
|
|
@ -1 +1,2 @@
|
|||
config.yaml
|
||||
/venv/
|
||||
|
|
|
|||
4
app.py
4
app.py
|
|
@ -2,6 +2,7 @@ import argparse
|
|||
import base64
|
||||
import json
|
||||
import secrets
|
||||
from urllib.parse import urlencode
|
||||
|
||||
import yaml
|
||||
from cryptography.hazmat.primitives import serialization
|
||||
|
|
@ -46,8 +47,7 @@ def authorize():
|
|||
"nonce": nonce,
|
||||
"public_key": public_key,
|
||||
}
|
||||
query = "&".join(f"{k}={v}" for k, v in params.items())
|
||||
return redirect(f"{config['forum_url']}/user-api-key/new?{query}")
|
||||
return redirect(f"{config['forum_url']}/user-api-key/new?{urlencode(params)}")
|
||||
|
||||
|
||||
@app.route("/callback")
|
||||
|
|
|
|||
Loading…
Reference in New Issue