[wp-trac] [WordPress Trac] #10057: wp_nonce_field() calls wp_referer_field() with too many args

WordPress Trac wp-trac at lists.automattic.com
Fri Dec 11 02:10:20 UTC 2009


#10057: wp_nonce_field() calls wp_referer_field() with too many args
-----------------------------+----------------------------------------------
 Reporter:  coffee2code      |        Owner:  markjaquith
     Type:  defect (bug)     |       Status:  accepted   
 Priority:  normal           |    Milestone:  3.0        
Component:  General          |      Version:  2.8        
 Severity:  minor            |   Resolution:             
 Keywords:  has-patch early  |  
-----------------------------+----------------------------------------------

Comment(by coffee2code):

 Of course, the alternative fix, which if vladimir is correct, is to omit
 the `'previous'` argument in the call to `wp_referer_field()` that was
 added in r7438 (specifics mentioned above).  The attached patch,
 10057.2.diff, does so.  This essentially retains the current state of
 affairs, but deals with the issue I originally raised (too many args sent
 to `wp_referer_field()`).

 I forget how deeply I looked into it originally, but since that rev added
 the function `wp_original_referer_field()` and also modified the
 aforementioned line of code to send a second arg of 'previous', it
 appeared consistent with an intent to change the function being called.
 If not, then that rev unnecessarily added the 'previous' arg.

 So, in short, the intent of the original WP code still bears some review,
 but the second patch should correct an improper call without compatibility
 issues.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10057#comment:7>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list