Skip to content

Commit

Permalink
Do not sanitize passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexP11223 committed Dec 14, 2021
1 parent 583d587 commit 1514841
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/ppcp-wc-gateway/src/Settings/SettingsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,11 @@ private function retrieve_settings_from_raw_data( array $raw_data ): array {
case 'text':
case 'number':
case 'ppcp-text-input':
case 'ppcp-password':
$settings[ $key ] = isset( $raw_data[ $key ] ) ? wp_kses_post( $raw_data[ $key ] ) : '';
break;
case 'ppcp-password':
case 'password':
if ( empty( $raw_data[ $key ] ) ) {
break;
}
$settings[ $key ] = sanitize_text_field( $raw_data[ $key ] );
$settings[ $key ] = $raw_data[ $key ] ?? '';
break;
case 'ppcp-multiselect':
$values = isset( $raw_data[ $key ] ) ? (array) $raw_data[ $key ] : array();
Expand Down

0 comments on commit 1514841

Please sign in to comment.