[buddypress-trac] [BuddyPress] #3852: Plugin form submits break if not trailingslashed

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Dec 13 22:26:10 UTC 2011


#3852: Plugin form submits break if not trailingslashed
--------------------------+-------------------------
 Reporter:  boonebgorges  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  major         |  Milestone:  1.6
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:  2nd-opinion
--------------------------+-------------------------
 Some plugins send post requests to non-trailing-slashed (or otherwise non-
 canonical) URLs. Our new bp_canonical_redirect() sends them on to the
 correct URL. But this screws up the data sent in the POST request.

 (Note that this should only happen for plugins that catch form submits in
 a screen function. Anyone hooked to bp_actions or bp_screens or even wp
 will not have the problem. It's only just before the template is loaded
 that the redirect takes place.)

 We can deal with this one of three ways:
 1) Before redirecting a non-canonical redirect, check to see whether
 $_POST has stuff in it. If so, don't redirect - let the URL resolve.
 2) Instead of doing a regular redirect, do a wp_remote_post(), with the
 original POST payload. This is pretty hackish, but possible.
 3) Don't do anything. Warn plugin authors on bpdevel, and let them solve
 it themselves in their plugins by setting their form actions to a proper
 URL.

 I lean towards (1). Other thoughts?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3852>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list