Make WordPress Core

Opened 13 years ago

Closed 13 years ago

#25270 closed defect (bug) (fixed)

Search form on wp-admin/themes.php page has a lot of extra parameters in referer field

Reported by: Otto42 Owned by: nacin
Priority: normal Milestone: 3.7
Component: Administration Version: 3.4
Severity: normal Keywords: has-patch
Cc: Focuses:

Description

Attachments (3)

25270.diff (408 bytes ) - added by Otto42 13 years ago.
change get to post
25270.2.diff (593 bytes ) - added by SergeyBiryukov 13 years ago.
25270.3.diff (605 bytes ) - added by SergeyBiryukov 13 years ago.
Remove 'features' too

Download all attachments as: .zip

Change History (7)

@Otto42
13 years ago

change get to post

#1 @SergeyBiryukov
13 years ago

  • Keywords has-patch added
  • Milestone Awaiting Review3.7
  • Version trunk3.4

Introduced in [19887].

We've had some issues with changing GET to POST in the past and had to go back (#16335, #18094).

Perhaps it's an edge case, but changing to POST here will re-introduce an issue similar to the one in #18094 for no-JS. Searching and filtering would be broken when navigating between pages if there are more themes found than the default per_page limit, which is 36 ([21768]).

An alternative solution would be to reset $_SERVER['REQUEST_URI'] to avoid the pollution of _wp_http_referer. We already do that in plugins.php and several other files: tags/3.6/wp-admin/plugins.php#L23.

See 25270.2.diff.

#2 @Otto42
13 years ago

  • Summary Search form on wp-admin/themes.php page should be POST instead of GETSearch form on wp-admin/themes.php page has a lot of extra parameters in referer field

That would work too. +1

@SergeyBiryukov
13 years ago

Remove 'features' too

#3 @nacin
13 years ago

I'm committing this but want to make it very clear I hate that we alter $_SERVER (beyond wp_fix_server_vars()) and would really like to eliminate all usage of it. :-)

#4 @nacin
13 years ago

  • Owner set to nacin
  • Resolutionfixed
  • Status newclosed

In 25679:

Don't let the query string pile up on successive themes.php searches.

props SergeyBiryukov.
fixes #25270.

Note: See TracTickets for help on using tickets.