Make WordPress Core

Opened 14 years ago

Closed 13 years ago

#17628 closed defect (bug) (fixed)

Fix $sendback for post row actions when no HTTP_REFERER is found

Reported by: mitchoyoshitaka's profile mitchoyoshitaka Owned by: mitchoyoshitaka's profile mitchoyoshitaka
Milestone: 3.3 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

On a system which doesn't properly project HTTP_REFERERs, the post row actions such as "delete", "restore", etc. will send the user back to post.php *without* the relevant post_type set, so a user can be managing pages or a custom post type and get kicked over to the general post.php.

Along the way, I discovered that the logic of wp_get_http_referer (introduced in r7438) didn't really make sense... in particular, if no HTTP_REFERER or _wp_http_referer is found, it will return an empty string instead of false. Discussed this with nacin and duck_ on irc and the correction for this is also included in the patch.

Attachments (1)

17628.diff (2.0 KB) - added by mitchoyoshitaka 14 years ago.

Download all attachments as: .zip

Change History (3)

#1 @SergeyBiryukov
14 years ago

  • Milestone changed from Awaiting Review to 3.3

#2 @ryan
13 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In [19272]:

Fix edit.php row action redirects when referrers are not sent. Return false from wp_get_referer() when no referrer found. Props mitchoyoshitaka. fixes #17628

Note: See TracTickets for help on using tickets.