fix: serve mixed-case page IDs via case-insensitive subdomain lookup #4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/mixed-case-page-ids"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Old IDs generated with token_urlsafe contained uppercase letters (e.g. sRysndGq).
HTTP host headers are case-folded by browsers, so the subdomain arrives lowercase and the case-sensitive DB lookup misses.
Use
func.lower()on both sides and resolve the file path from page.id (the stored value) rather than the extracted subdomain.