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] Case sensitive Web redirect #3323

Closed
xeruf opened this issue Mar 4, 2023 · 3 comments · Fixed by #3325
Closed

[Bug] Case sensitive Web redirect #3323

xeruf opened this issue Mar 4, 2023 · 3 comments · Fixed by #3325
Labels
bug Something isn't working

Comments

@xeruf
Copy link
Contributor

xeruf commented Mar 4, 2023

Describe the bug

The redirect url is always lowercased.
We now encountered a certain Nextcloud URL which requires the case to match for it to work, so we seem to currently be unable to configure a redirect for it.

Tell us how to replicate the bug

  1. Add a Web Domain
  2. Add a redirect with mixed case
  3. It is lowercased upon save.

Which components are affected by this bug?

Control Panel Web Interface

Hestia Control Panel Version

v1.6.14

Operating system

Debian 11.6 (x86_64)

Log capture

No response

@xeruf xeruf added the bug Something isn't working label Mar 4, 2023
jaapmarcus added a commit to jaapmarcus/hestiacp that referenced this issue Mar 5, 2023
Bug was caused by idn2 --quiet $3 that rewrites idn domain to their puny code equivalent version.
Causing paths to get rewriten to lowercase. To prevent this issue we split now:
$scheme $host and $path and only convert the $host one and keep the reset untouched.
@jaapmarcus jaapmarcus linked a pull request Mar 5, 2023 that will close this issue
jaapmarcus added a commit that referenced this issue Mar 5, 2023
* Fix: #3323 Web domain redirect with IDN2

Bug was caused by idn2 --quiet $3 that rewrites idn domain to their puny code equivalent version.
Causing paths to get rewriten to lowercase. To prevent this issue we split now:
$scheme $host and $path and only convert the $host one and keep the reset untouched.

* Use "$host" instead
@xeruf
Copy link
Contributor Author

xeruf commented Mar 5, 2023

Thank you for the prompt fix! Any plans for a new release soon? ;)

@ScIT-Raphael
Copy link
Member

Next release is 1.7.0, help out testing and it will come soon: https://discord.com/channels/737721354937303161/737954451687735306/1080954852777140234

@xeruf
Copy link
Contributor Author

xeruf commented Mar 28, 2023

Hez, unfortunatelz this is still not quite fixed: The case is preserved and the link correctly displayed in the interface, but in the response header (as seen in curl), it appends a / to the location, which breaks the URL :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants