[wp-trac] [WordPress Trac] #2800: wp_nonce_field() could pass along
HTTP_REFERER info
WordPress Trac
wp-trac at lists.automattic.com
Thu Jun 8 06:53:57 GMT 2006
#2800: wp_nonce_field() could pass along HTTP_REFERER info
----------------------------+-----------------------------------------------
Id: 2800 | Status: new
Component: Administration | Modified: Thu Jun 8 06:53:56 2006
Severity: enhancement | Milestone: 2.1
Priority: normal | Version: 2.1
Owner: anonymous | Reporter: markjaquith
----------------------------+-----------------------------------------------
Sometimes we make use of the HTTP_REFERER in WordPress in order to
redirect people after an action is performed.
Since all forms that do something use {{{wp_nonce_field()}}} anyway, we
could just have {{{wp_nonce_field}}} echo out another hidden form input:
{{{
echo '<input type="hidden" name="wp_http_referer" value="'.
wp_specialchars(stripslashes($_SERVER['REQUEST_URI'])) . '" />';
}}}
Might be nice being able to count on that! I'd make it its own function,
that {{{wp_nonce_field}}} would call.
--
Ticket URL: <http://trac.wordpress.org/ticket/2800>
WordPress Trac <http://wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list