Skip to content

Commit

Permalink
vendor/bin/phpcbf
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Oct 11, 2023
1 parent 69ca91b commit cf1a258
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function __construct( Config $config ) {

$ideal_issuer_field->set_options(
new CachedCallbackOptions(
function() {
function () {
return $this->get_ideal_issuers();
},
'pronamic_pay_ideal_issuers_' . \md5( (string) \wp_json_encode( $config ) )
Expand Down
16 changes: 8 additions & 8 deletions src/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@ public function get_settings_fields() {
'type' => 'text',
'default' => 1825,
'tooltip' => __( 'Number of days the generated certificate will be valid for, e.g. 1825 days for the maximum duration of 5 years.', 'pronamic_ideal' ),
'input' => function( $name ) {
'input' => function ( $name ) {
if ( ! \array_key_exists( $name, $_POST ) ) {

Check failure on line 171 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Processing form data without nonce verification.
return '';
}

return \filter_var( \sanitize_text_field( \wp_unslash( $_POST[ $name ] ) ), \FILTER_SANITIZE_NUMBER_INT );

Check failure on line 175 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Processing form data without nonce verification.
}
},
];

// Secret Key Password.
Expand All @@ -186,14 +186,14 @@ public function get_settings_fields() {
'classes' => [ 'regular-text', 'code' ],
'default' => wp_generate_password(),
'tooltip' => __( 'A random password which will be used for the generation of the secret key and certificate.', 'pronamic-ideal' ),
'input' => function( $name ) {
'input' => function ( $name ) {
if ( ! \array_key_exists( $name, $_POST ) ) {

Check failure on line 190 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Processing form data without nonce verification.
return '';
}

// phpcs:ignore Detected usage of a non-sanitized input variable -- Password can contain whitespace, HTML tags and percent-encoded characters.
return $_POST[ $name ];

Check warning on line 195 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Detected usage of a non-sanitized input variable: $_POST[$name]

Check failure on line 195 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Processing form data without nonce verification.
}
},
];

// Secret Key.
Expand All @@ -206,14 +206,14 @@ public function get_settings_fields() {
'callback' => [ $this, 'field_private_key' ],
'classes' => [ 'code' ],
'tooltip' => __( 'The secret key is used for secure communication with the payment provider. If left empty, the secret key will be generated using the given secret key password.', 'pronamic-ideal' ),
'input' => function( $name ) {
'input' => function ( $name ) {
if ( ! \array_key_exists( $name, $_POST ) ) {

Check failure on line 210 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Processing form data without nonce verification.
return '';
}

// phpcs:ignore Detected usage of a non-sanitized input variable -- Private key can contain whitespace, HTML tags and percent-encoded characters.
return $_POST[ $name ];

Check warning on line 215 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Detected usage of a non-sanitized input variable: $_POST[$name]

Check failure on line 215 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Processing form data without nonce verification.
}
},
];

// Certificate.
Expand All @@ -226,14 +226,14 @@ public function get_settings_fields() {
'callback' => [ $this, 'field_certificate' ],
'classes' => [ 'code' ],
'tooltip' => __( 'The certificate is used for secure communication with the payment provider. If left empty, the certificate will be generated using the secret key and given organization details.', 'pronamic-ideal' ),
'input' => function( $name ) {
'input' => function ( $name ) {
if ( ! \array_key_exists( $name, $_POST ) ) {

Check failure on line 230 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Processing form data without nonce verification.
return '';
}

// phpcs:ignore Detected usage of a non-sanitized input variable -- Certificate can contain whitespace, HTML tags and percent-encoded characters.
return $_POST[ $name ];

Check warning on line 235 in src/Integration.php

View workflow job for this annotation

GitHub Actions / phpcs / phpcs

Detected usage of a non-sanitized input variable: $_POST[$name]
}
},
];

// Return.
Expand Down

0 comments on commit cf1a258

Please sign in to comment.