Regarding point 3 in this (awesome) article on mikejolley.com.
It states:
Never trust user input, even that provided by admin users, because:
- You have no way of knowing the user is whom they say they are.
- Other scripts can manipulate posted data.
I can understand that it's important to not trust all user input, since a user with a different role can have bad intentions.
But then talking about admin users, the first point kind of breaks the concept to me. If someone has managed to access the admin area by making it look like they are someone else, isn't it all over anyway? I mean, even when you escape and sanitise everything, couldn't the hacker just insert a backdoor by saving code in http://www.example.com/wp-admin/theme-editor.php?
How likely is it that someone unwanted infiltrates the WordPress admin area?
Exceptions:
- Knowing the admin password with bad intentions
- Brute force attack or some other attack that allows the attacker to login.