[wp-trac] [WordPress Trac] #10057: wp_nonce_field() calls
wp_referer_field() with too many args
WordPress Trac
wp-trac at lists.automattic.com
Sun Jun 7 07:05:41 GMT 2009
#10057: wp_nonce_field() calls wp_referer_field() with too many args
--------------------------+-------------------------------------------------
Reporter: coffee2code | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.9
Component: General | Version: 2.8
Severity: minor | Keywords: has-patch
--------------------------+-------------------------------------------------
In `wp_nonce_field()` in `wp-includes/functions.php`, a call is made to
`wp_referer_field()` with two arguments. However, `wp_referer_field()`
only accepts one argument.
`wp_original_referer_field()` accepts two arguments and is probably what
was originally intended.
Refer to r7438 (specifically
http://core.trac.wordpress.org/changeset/7438/trunk/wp-
includes/functions.php). Mark added a second argument to
`wp_original_referer_field()` while also adding the second (and
technically invalid) argument to the call to `wp_referer_field()` in
`wp_nonce_field()`.
This leads me to believe that the `wp_referer_field()` call in question
was intended to be changed to be a call to the updated
`wp_original_referer_field()` function. This is also affirmed by the fact
that there are no other calls to `wp_referer_field()` in the codebase
except once in the livejournal importer.
As such, the attached patch changes the name of the function being called.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/10057>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list