[wp-trac] Re: [WordPress Trac] #7291: user-edit.php doesn't do user exist check

WordPress Trac wp-trac at lists.automattic.com
Wed Aug 13 19:36:08 GMT 2008


#7291: user-edit.php doesn't do user exist check
----------------------------+-----------------------------------------------
 Reporter:  Viper007Bond    |        Owner:  anonymous
     Type:  defect          |       Status:  new      
 Priority:  lowest          |    Milestone:  2.7      
Component:  Administration  |      Version:  2.6      
 Severity:  minor           |   Resolution:           
 Keywords:  has-patch       |  
----------------------------+-----------------------------------------------
Changes (by mrmist):

  * keywords:  needs-patch => has-patch

Comment:

 My attempt at this - adds a function check_user_id($id) which checks in
 the users database and returns the id that matches (if the user exists) or
 an empty set.  Then adds logic to user_edit to check the id passed using
 the function.

 If the user id does not exist, the page calls wp_die.

 Strictly, the logic doing the test before the wp_die is unnecessary, as
 the immediately following block of code will pick up the empty id, but I
 thought it best to include the check so that the test is self-sufficient.

 In IE7 with pretty errors enabled, you get a internal server error not the
 wp_die message.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/7291#comment:1>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list