#23865 closed defect (bug) (fixed)
Trailing slash is not enforced when editing the path for a subdirectory site in multisite
Reported by: | simonwheatley | Owned by: | jeremyfelt |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Networks and Sites | Keywords: | has-patch dev-feedback needs-refresh |
Focuses: | multisite | Cc: |
Description
It is possible to edit an existing subdirectory site so that the path does not end in a trailing slash, this causes the subdirectory site in question to have an inaccessible home URL.
To reproduce:
- Create a multisite network in subdirectory mode
- Create a new subdirectory site
- Visit the subdirectory site successfully
- Edit the site to change the path so there is no trailing slash
- You should be unable to visit the subdirectory site now
Attachments (3)
Change History (17)
#3
@
12 years ago
Good spot, yes it can. Even more terminal issues there.
Patch amended to also add a prefixing slash.
#5
@
11 years ago
Attaching a diff showing a different approach, this time I'm using sanitise title and then adding the slashes manually. This approach allows us to check for multiple slashes which might have been added as well.
Also attaching some tests for this issue.
My first unit tests for WordPress, so I'd welcome any feedback. :)
@
11 years ago
Use sanitize_title and manually add prefixing and trailing slash for subdir site path
#7
@
11 years ago
- Milestone changed from Awaiting Review to Future Release
Related #18117 (almost duplicate). It would be good to make sure both of these solutions go hand in hand.
#8
@
11 years ago
@simonwheatley - I have feedback on process. :) The new develop.svn repository allows for the creation of a single patch that includes both the src and tests changes. It's much easier to apply and test that. Just run svn diff
from the root of develop.svn's trunk.
#10
@
10 years ago
- Keywords needs-refresh added
I'd like to work on getting this in for 4.1. We should refresh the patch to match the unit test changes in #29896.
#11
@
10 years ago
18117.4.diff:ticket:18117 appears to solve the trailing slash problem described in this ticket.
Can the same thing can happen with the leading slash?