-
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't working
Description
If settings.SERVER_HOST contains a trailing forward slash then links a generated with a duplicate forward slash, breaking the link. I've seen this for authorization links, registration links and reset password links in utils.py :
farmOS-aggregator/backend/app/app/utils.py
Lines 184 to 185 in 8285090
| server_host = settings.SERVER_HOST | |
| link = f"{server_host}/authorize-farm/?farm_id={farm_id}&api_token={token.decode()}" |
It may be easiest to validate settings.SERVER_HOST to always have a trailing /. Then we can use urllib.parse.urljoin(base, url) to build the link.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working