From 632734fee2fff22f593461615596fb14afda9501 Mon Sep 17 00:00:00 2001 From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:35:55 +0200 Subject: [PATCH] Custom input callback is not required, the default `sanitize_textarea_field` seems ok. --- src/Integration.php | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/Integration.php b/src/Integration.php index 1f85fc9..bc4b8ae 100644 --- a/src/Integration.php +++ b/src/Integration.php @@ -212,18 +212,6 @@ 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 ) { - // phpcs:disable WordPress.Security.NonceVerification.Missing - - if ( ! \array_key_exists( $name, $_POST ) ) { - return ''; - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Private key can contain whitespace, HTML tags and percent-encoded characters. - return $_POST[ $name ]; - - // phpcs:enable WordPress.Security.NonceVerification.Missing - }, ]; // Certificate. @@ -236,18 +224,6 @@ 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 ) { - // phpcs:disable WordPress.Security.NonceVerification.Missing - - if ( ! \array_key_exists( $name, $_POST ) ) { - return ''; - } - - // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Certificate can contain whitespace, HTML tags and percent-encoded characters. - return $_POST[ $name ]; - - // phpcs:enable WordPress.Security.NonceVerification.Missing - }, ]; // Return.