Skip to content

Commit

Permalink
Merge pull request #843 from Codeinwp/bugfix/pro/649
Browse files Browse the repository at this point in the history
Sanitize missing setting fields
  • Loading branch information
vytisbulkevicius authored Dec 18, 2023
2 parents 24c0eac + 4b7f1e9 commit d1e6650
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions includes/admin/feedzy-rss-feeds-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,10 +598,10 @@ private function save_settings() {
break;
case 'proxy':
$settings['proxy'] = array(
'host' => isset( $_POST['proxy-host'] ) ? filter_input( INPUT_POST, 'proxy-host', FILTER_UNSAFE_RAW ) : '',
'port' => isset( $_POST['proxy-port'] ) ? filter_input( INPUT_POST, 'proxy-port', FILTER_SANITIZE_NUMBER_INT ) : '',
'user' => isset( $_POST['proxy-user'] ) ? filter_input( INPUT_POST, 'proxy-user', FILTER_UNSAFE_RAW ) : '',
'pass' => isset( $_POST['proxy-pass'] ) ? filter_input( INPUT_POST, 'proxy-pass', FILTER_UNSAFE_RAW ) : '',
'host' => isset( $_POST['proxy-host'] ) ? sanitize_text_field( wp_unslash( $_POST['proxy-host'] ) ) : '',
'port' => isset( $_POST['proxy-port'] ) ? (int) $_POST['proxy-port'] : '',
'user' => isset( $_POST['proxy-user'] ) ? sanitize_text_field( wp_unslash( $_POST['proxy-user'] ) ) : '',
'pass' => isset( $_POST['proxy-pass'] ) ? sanitize_text_field( wp_unslash( $_POST['proxy-pass'] ) ) : '',
);
break;
default:
Expand Down

0 comments on commit d1e6650

Please sign in to comment.