Opened 2 years ago
Closed 22 months ago
#16548 closed defect (bug) (fixed)
Plugin searches drop spaces with further action
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.3 |
| Component: | Administration | Version: | 3.1 |
| Severity: | normal | Keywords: | has-patch commit 3.3-early |
| Cc: |
Description
Steps to reproduce:
- Search for a valid plugin name with a space in it
- Activate it
- The space will be dropped from the redirected URL by wp_redirect() sanitization
Attachments (3)
Change History (17)
comment:1
solarissmoke — 2 years ago
SergeyBiryukov — 2 years ago
comment:2
SergeyBiryukov — 2 years ago
- Keywords has-patch added
comment:3
solarissmoke — 2 years ago
@SergeyBiryukov the patch doesn't change anything? Steps to reproduce still cause the same issue.
comment:4
SergeyBiryukov — 2 years ago
Ah, I was checking the wrong installation. Feel free to make a proper one :)
This comes back to the usage of "...&s=$s" which translates to "...&s=Add From Server" which is obviously wrong.
Given the sheer number of redirects it's used in, This patch simply urlencodes it when it gets it from the request.
- Keywords commit added
- Milestone changed from Awaiting Review to 3.1
Bumping to 3.1 for another dev to check
Search for a valid plugin name with a space in it
I assume we're talking about the plugin's directory name, not the "Plugin Name:" header.
Also, is this a regression?
comment:8
in reply to:
↑ 7
solarissmoke — 2 years ago
Replying to scribu:
I assume we're talking about the plugin's directory name, not the "Plugin Name:" header.
No, we are talking about the plugin name, e.g. "Hello Dolly"
Also, is this a regression?
No - it's actually worse in 3.0.x because the search query is emptied, and you get this notice:
Notice: Undefined variable: total_search_plugins in wp-admin\plugins.php on line 475
comment:10
ryan — 2 years ago
- Keywords 3.2-early added
- Milestone changed from 3.1 to Future Release
Per bug scrub, punting to 3.2.
comment:12
in reply to:
↑ 5
SergeyBiryukov — 23 months ago
Replying to dd32:
Given the sheer number of redirects it's used in, This patch simply urlencodes it when it gets it from the request.
Looks like urldecode() for display is not required, since $s is restored to non-encoded form in wp_reset_vars() via $wp_list_table->prepare_items().
comment:13
nacin — 22 months ago
- Milestone changed from Future Release to 3.3
comment:14
ryan — 22 months ago
- Owner set to ryan
- Resolution set to fixed
- Status changed from new to closed
In [18452]:

Maybe we should drop the search query var when doing other actions?