WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#37041 new enhancement

Allow arbitrary return redirects when activating plugins

Reported by: rmccue Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Plugins Keywords: has-patch needs-refresh
Focuses: administration Cc:

Description

After activating a plugin, the return redirect is set to either import.php or plugins.php depending on the from query parameter. It'd be nice to have the ability to specify an arbitrary redirect_to similar to the login process.

This should probably be locked down using wp_safe_redirect.

Attachments (1)

37041.diff (2.8 KB) - added by rmccue 2 years ago.

Download all attachments as: .zip

Change History (5)

@rmccue
2 years ago

#1 @rmccue
2 years ago

  • Keywords has-patch added

Added initial patch. Needs sanity checking.

This ticket was mentioned in Slack in #feature-shinyupdates by rmccue. View the logs.


2 years ago

#3 @swissspidy
2 years ago

Had a quick look at the patch. Why does it use wp_redirect() once and once wp_safe_redirect()?

#4 @rmccue
2 years ago

  • Keywords needs-refresh added

Whoops, forgot to update that one. Technically, it doesn't need to, as the redirect gets run through wp_validate_redirect() previously, but might as well double-check.

Note: See TracTickets for help on using tickets.