Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: short subdomain length stops frontend loading #43

Closed
Hiumee opened this issue Apr 7, 2024 · 3 comments
Closed

Bug: short subdomain length stops frontend loading #43

Hiumee opened this issue Apr 7, 2024 · 3 comments

Comments

@Hiumee
Copy link

Hiumee commented Apr 7, 2024

A short subdomain length will treat the /static path as a subdomain
The get_subdomain_from_path function usually returns None due to the / after those paths. With a subdomain length <= 6 the / character is not considered and passes the set(subdomain) - alphabet_set != set() check

@adrgs
Copy link
Owner

adrgs commented Apr 8, 2024

Good catch, thanks. Added public and api to reserved_keywords in config.py, such that they won't be overriden in the default case.
Fixed in #45

@adrgs adrgs closed this as completed Apr 8, 2024
@Hiumee
Copy link
Author

Hiumee commented Apr 8, 2024

Still not fixed. static should be a keyword, other paths are affected like logo.svg
For a 4-letter domain, the line subdomain = path[:length] truncates the input from static to stat and fails the check
Something like subdomain = path[:subdomain.find('/')] when it contains / might be a better fix

@adrgs
Copy link
Owner

adrgs commented Apr 8, 2024

You're correct, it's static not public. Added it and a few others like logo, assets and favicon to keywords. I think that should be all.
Let me know if there's anything that I've missed in #49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants