[wp-trac] [WordPress Trac] #62477: Do not use $_POST['action'] in the sanitize function.

WordPress Trac noreply at wordpress.org
Wed Nov 20 09:46:38 UTC 2024


#62477: Do not use $_POST['action'] in the sanitize function.
-------------------------------+-------------------------------
 Reporter:  nikitasolanki1812  |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  has-patch          |     Focuses:  coding-standards
-------------------------------+-------------------------------

Comment (by jigar bhanushali):

 I have added an improved version of the previous patch. I hope this works
 well.

 - Fixed missing sanitization in other areas.
 - Eliminated redundant isset checks for the same variable.
 - Removed unnecessary variable casting for $post_category as it is already
 handled in the condition.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/62477#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list