Skip to content

Commit aa782ce

Browse files
authored
Merge pull request #18 from codebard/2.2.1
2.2.1
2 parents c7b8bf7 + 2406958 commit aa782ce

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

index.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ private function __construct()
5252
require_once($this->internal['plugin_path'].'plugin/includes/default_internal_vars.php');
5353
require_once($this->internal['plugin_path'].'plugin/includes/hardcoded_vars.php');
5454

55-
if(isset($_REQUEST[$this->internal['prefix'].'action']))
55+
if(isset($_REQUEST[$this->internal['prefix'].'action'] ))
5656
{
57-
$this->internal['requested_action'] = $_REQUEST[$this->internal['prefix'].'action'];
57+
$this->internal['requested_action'] = filter_var( $_REQUEST[$this->internal['prefix'].'action'], FILTER_SANITIZE_STRING);
5858
}
5959
else
6060
{
@@ -685,7 +685,7 @@ public function do_admin_page_tabs_c()
685685

686686
if(isset($_REQUEST[$this->internal['prefix'].'tab']))
687687
{
688-
$tab=$_REQUEST[$this->internal['prefix'].'tab'];
688+
$tab = filter_var( $_REQUEST[$this->internal['prefix'].'tab'], FILTER_SANITIZE_STRING ) ;
689689
}
690690

691691
if(!isset($tab))
@@ -805,7 +805,7 @@ public function do_settings_pages_c($v1)
805805

806806
if(isset($_REQUEST[$this->internal['prefix'] . 'tab']))
807807
{
808-
$tab = sanitize_text_field($_REQUEST[$this->internal['prefix'].'tab']);
808+
$tab = filter_var( $_REQUEST[$this->internal['prefix'].'tab'], FILTER_SANITIZE_STRING );
809809
}
810810
else
811811
{
@@ -854,7 +854,7 @@ public function do_admin_settings_form_header_c()
854854

855855
if(isset($_REQUEST[$this->internal['prefix'] . 'tab']))
856856
{
857-
$tab = sanitize_text_field( $_REQUEST[$this->internal['prefix'] . 'tab'] );
857+
$tab = filter_var( $_REQUEST[$this->internal['prefix'] . 'tab'], FILTER_SANITIZE_STRING );
858858

859859
}
860860
else
@@ -883,7 +883,7 @@ public function do_admin_settings_form_footer_c()
883883

884884
if(isset($_REQUEST['tab']))
885885
{
886-
$tab=$_REQUEST['tab'];
886+
$tab = filter_var( $_REQUEST['tab'], FILTER_SANITIZE_STRING );
887887

888888
}
889889
else

plugin/plugin.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ public function enqueue_admin_styles_p()
208208
{
209209
$current_screen=get_current_screen();
210210

211-
if($current_screen->base=='toplevel_page_settings_'.$this->internal['id'] OR ( isset( $_REQUEST['page']) AND $_REQUEST['page']== 'cb_p6_install_pw' ) )
211+
if($current_screen->base=='toplevel_page_settings_'.$this->internal['id'] OR ( isset( $_REQUEST['page']) AND $_REQUEST['page'] == 'cb_p6_install_pw' ) )
212212
{
213213
wp_enqueue_style( $this->internal['id'].'-css-admin', $this->internal['plugin_url'].'plugin/includes/css/admin.css' );
214214

@@ -1341,10 +1341,10 @@ public function admin_message_page_p() {
13411341
$content = $this->lang['admin_message_default_content'];
13421342

13431343
if ( isset( $_REQUEST['cb_p6_admin_message_title'] ) ) {
1344-
$heading = $this->lang[ $_REQUEST['cb_p6_admin_message_title'] ];
1344+
$heading = $this->lang[ filter_var( $_REQUEST['cb_p6_admin_message_title'], FILTER_SANITIZE_STRING) ];
13451345
}
13461346
if ( isset( $_REQUEST['cb_p6_admin_message_content'] ) ) {
1347-
$content = $this->lang[ $_REQUEST['cb_p6_admin_message_content'] ];
1347+
$content = $this->lang[ filter_var( $_REQUEST['cb_p6_admin_message_content'], FILTER_SANITIZE_STRING) ];
13481348
}
13491349

13501350
echo '<div id="cb_p6_admin_message_page"><h1 style="margin-top: 0px;">' . $heading . '</h1><div id="cb_p6_admin_message_content">' . $content . '</div></div>';

0 commit comments

Comments
 (0)