summaryrefslogtreecommitdiff
path: root/Postman/PostmanAjaxController.php
diff options
context:
space:
mode:
authoryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-08-28 20:15:29 +0000
committeryehudah <yehudah@b8457f37-d9ea-0310-8a92-e5e31aec5664>2019-08-28 20:15:29 +0000
commit5f134fb5839bf3e161385727c2a2009b54444878 (patch)
treec504f5ec5158704dbfd96f74d8675ab228f0070a /Postman/PostmanAjaxController.php
parent6372e454198ed7a1a792b5bfd286af1178ae7d63 (diff)
downloadPost-SMTP-5f134fb5839bf3e161385727c2a2009b54444878.zip
security + export csv
Diffstat (limited to 'Postman/PostmanAjaxController.php')
-rw-r--r--Postman/PostmanAjaxController.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/Postman/PostmanAjaxController.php b/Postman/PostmanAjaxController.php
index 16d70cc..ad63464 100644
--- a/Postman/PostmanAjaxController.php
+++ b/Postman/PostmanAjaxController.php
@@ -49,9 +49,16 @@ if (! class_exists ( 'PostmanAbstractAjaxHandler' )) {
*/
protected function getRequestParameter($parameterName) {
if (isset ( $_POST [$parameterName] )) {
- $value = sanitize_text_field($_POST[$parameterName]);
+ if ( is_array($_POST [$parameterName] ) ) {
+ array_walk_recursive( $_POST [$parameterName], 'sanitize_text_field' );
+ $value = $_POST [$parameterName];
+ } else {
+ $value = sanitize_text_field($_POST[$parameterName]);
+ }
+
$this->logger->trace ( sprintf ( 'Found parameter "%s"', $parameterName ) );
$this->logger->trace ( $value );
+
return $value;
}
}