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

Allow "&" and "+" characters in custom slugs again. #2156

Open
tiritibambix opened this issue Jul 18, 2024 · 6 comments
Open

Allow "&" and "+" characters in custom slugs again. #2156

tiritibambix opened this issue Jul 18, 2024 · 6 comments
Labels
Milestone

Comments

@tiritibambix
Copy link

tiritibambix commented Jul 18, 2024

Summary

Hi there!

I'm a big fan of shlink and have been using it for over a year now. It's been a great tool for me, super efficient and convenient.

I do have a small request though - I used to be able to use characters like "&" and "+" in my custom slugs, which was really handy for readability. It would be awesome if I could use them again.

I receive this error:

Provided data is not valid

Invalid elements: [customSlug]

Thanks so much for considering this!

Use case

/T+B-lunch
/T&C_car

@acelaya
Copy link
Member

acelaya commented Jul 18, 2024

I used to be able to use characters like "&" and "+" in my custom slugs

In what version did you stop being able to use those? I don't remember making a conscious decision to "not allow" them, so it might be a side effect of some other change.

In any case, it might be a desirable side effect, as those are invalid URL characters that would need to be encoded, but with proper url-encoding, I don't see an immediate reason.

Also, can you elaborate what are you experiencing that you are interpreting as "not being able to use them"? Do you get an error? If so, which one? Have you checked the logs?

@acelaya
Copy link
Member

acelaya commented Jul 23, 2024

Closing until requested information is provided.

@acelaya acelaya closed this as not planned Won't fix, can't repro, duplicate, stale Jul 23, 2024
@github-project-automation github-project-automation bot moved this to Done in Shlink Jul 23, 2024
@acelaya acelaya removed this from Shlink Jul 23, 2024
@tiritibambix
Copy link
Author

Thanks for your answer.

I am away From home for quite a while so I'm sorry I can't answer properly for the moment as I don't have access to the logs.

I can't remember what version it started not working.

As for the error message, it is mentioned in my original post.

@acelaya
Copy link
Member

acelaya commented Jul 23, 2024

As for the error message, it is mentioned in my original post.

Thanks! I somehow missed that, perhaps I read the message in the email notification from GitHub and didn't realize it had been updated right after.

@acelaya acelaya reopened this Jul 23, 2024
@acelaya
Copy link
Member

acelaya commented Jul 23, 2024

Ok, so I found when was this introduced. It was the result of this bug report #1901 (you can ignore everything after my first comment there, because the conversation deviated into a feature request not related to the bug itself).

To fix that, this PR was provided, which validates custom slugs to disallow URL-reserved characters as per this RFC.

I need to do a bit of investigation and think on potential side effects of changing this, or if that decision was wrong in the first place.

@acelaya acelaya changed the title Bring back "&" and "+" please. Allow "&" and "+" characters in custom slugs again. Jul 23, 2024
@tiritibambix
Copy link
Author

I'm really glad you're considering looking into this and I'm looking forward to reading you on this matter :)

@acelaya acelaya added this to the 4.4.0 milestone Nov 11, 2024
@acelaya acelaya moved this to Todo in Shlink Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

2 participants