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

Feature/slug url chars #1911

Merged
merged 2 commits into from
Nov 5, 2023

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented Nov 5, 2023

Closes #1901

This PR adds validation to custom slugs to make sure URL-reserved characters are not allowed.

Not allowed characters are the ones specified in RFC-3986, with the only exception that, if multi-segment slugs are enabled, then the / character is allowed.

Copy link

codecov bot commented Nov 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d9d6d5b) 96.73% compared to head (e431395) 96.74%.

Additional details and impacted files
@@              Coverage Diff              @@
##             develop    #1911      +/-   ##
=============================================
+ Coverage      96.73%   96.74%   +0.01%     
- Complexity      1306     1313       +7     
=============================================
  Files            244      245       +1     
  Lines           4530     4551      +21     
=============================================
+ Hits            4382     4403      +21     
  Misses           148      148              
Files Coverage Δ
module/Core/src/Options/UrlShortenerOptions.php 100.00% <ø> (ø)
.../ShortUrl/Model/Validation/CustomSlugValidator.php 100.00% <100.00%> (ø)
.../ShortUrl/Model/Validation/ShortUrlInputFilter.php 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acelaya acelaya force-pushed the feature/slug-url-chars branch from 61a4e1b to e431395 Compare November 5, 2023 09:41
@acelaya acelaya merged commit 1a4a107 into shlinkio:develop Nov 5, 2023
62 of 64 checks passed
@acelaya acelaya deleted the feature/slug-url-chars branch November 5, 2023 09:52
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.

Adding URL reserved characters to custom slug creates a non-editable non-working shorturl
1 participant