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

disallow forwards slashes in slugs #12874

Closed
wants to merge 1 commit into from

Conversation

i-just
Copy link
Contributor

@i-just i-just commented Mar 13, 2023

Description

Disallows forward slash in slugs when saving an element.

I’m torn between this approach and a more drastic version where we check if the slugWordSeparator is set to / on getting the general config (similar to how we check the securityKey).

On the one hand, the approach in this PR should provide better backward compatibility on the off-chance that someone was using / as a slug word separator. It would still allow it in, e.g. autogenerated entry URI format on section creation.
On the other hand, throwing an exception on getting the general config is a more robust way of seriously disallowing /.

@brandonkelly, when you have a second, could you please LMK your thoughts?

Related issues

#12871

@i-just i-just requested a review from a team as a code owner March 13, 2023 10:13
@brandonkelly
Copy link
Member

Just added a little protection to swap /s with -s in CP edit URLs for now.

@brandonkelly brandonkelly deleted the bugfix/12871-disallow-forward-slashes-in-slugs branch March 13, 2023 21:04
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

Successfully merging this pull request may close these issues.

2 participants