Permalink
Browse files

Sanitize the admin page string

  • Loading branch information...
1 parent d8a544e commit a0f34009aa3dc501666d106ee62ab534c4c3e9a4 @lildude lildude committed Oct 21, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 handlers/adminhandler.php
@@ -101,6 +101,7 @@ public function setup_admin_theme( $page, $type = '' )
public function act_admin()
{
$page = ( isset( $this->handler_vars['page'] ) && !empty( $this->handler_vars['page'] ) ) ? $this->handler_vars['page'] : 'dashboard';
+ $page = filter_var( $page, FILTER_SANITIZE_STRING );
if ( isset( $this->handler_vars['content_type'] ) ) {
$type = Plugins::filter( 'post_type_display', Post::type_name( $this->handler_vars['content_type'] ), 'singular' );
}

0 comments on commit a0f3400

Please sign in to comment.