Opened 2 years ago
Closed 2 years ago
#17038 closed defect (bug) (fixed)
Plugin & theme editors should URL encode file names
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Administration | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch needs-testing |
| Cc: |
Description
Steps to reproduce:
- Name a file: foo&bar.php
- Try editing the file in the editor
The plugin editor dropdown can also be broken with a file name containing a HTML entity.
Attachments (2)
Change History (10)
Patch addresses URL encoding, but doesn't address encoding to deal with HTML entities in file names being displayed.
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.2
- Keywords close added
- Type changed from defect (bug) to enhancement
The patch seems good however in principle I'm -1. Generally plugins and themes are (parts of) software. I think plugin and theme authors can afford to use plain ASCII for the filenames of their software. That also closes the door for some (unlikely) incompatibility with some server operating systems.
- Keywords close removed
End user: Look, I can select this weirdly named file to edit it. Click. "File not found"?? Stupid WP.
We should either allow the user to edit the file or not show it at all.
- Keywords needs-testing added
- Type changed from enhancement to defect (bug)
I agree with scribu here, If the file is valid on the system, we should allow it to be used, to prevent url issues, encoding it seems the sane thing to do.
Patch looks fine, but haven't tested it.
comment:7
studionashvegas — 2 years ago
Before Patch: tested (with same filename as above) and was able to reproduce with same error.
After Patch: able to edit file - patch applies clean

Related: #13377