It is possible to create short links with '/' in them which cannot be deleted
Closed this issue · 2 comments
smstroble commented
Describe the bug
It is possible to create short links with '/' in them which cannot be deleted
To Reproduce
Steps to reproduce the behavior:
- Go to 'http://localhost:4567'
- Enter any long URL
- Enter short url 'some/path'
- Click 'Shorten!'
- Attempt to delete the newly created URL
- Attempt to navigate to 'http://localhost:4567/some/path'
Expected behavior
Any short URL created should be deletable. Editing the REST call to replace '/' with '%2F' works to delete it.
Possible solutions:
- Add support for URLs with slashes
- Update the page JS to URL escape characters in the delete request
- Update resolver to handle these as well
- Block creation of such URLs
Supporting
Desktop (please complete the following information):
- OS: Windows
- Browser: Firefox
- Version 123.0.1
SinTan1729 commented
Thank you for the bug report. I decided to go with blocking such URLs. This was already supposed to be the case but I goofed up the regex string for checking validity. I just pushed a commit potentially fixing this. Can you check and let me know if this fixed the issue for you?
smstroble commented
Perfect, that worked for me. Thanks!