Skip to content
Snippets Groups Projects
Commit ce467447 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Added sanitization on posted AJAX data

parent fe4d0a5f
No related branches found
No related tags found
1 merge request!17Added sanitization on posted AJAX data
Pipeline #10491 failed
## [3.1.2] - 2020-03-05
### Added
- sanitization on posted AJAX data
## [3.1.1] - 2019-07-30
### Fixed
- Security for templates as side effect is generated there. Also required for prefixer compatibility
......
......@@ -82,10 +82,10 @@ class AjaxHandler implements HookablePluginDependant
public function processAjaxNoticeDismiss()
{
if (isset($_POST[self::POST_FIELD_NOTICE_NAME])) {
$noticeName = $_POST[self::POST_FIELD_NOTICE_NAME];
$noticeName = sanitize_text_field($_POST[self::POST_FIELD_NOTICE_NAME]);
if (isset($_POST[self::POST_FIELD_SOURCE])) {
$source = $_POST[ self::POST_FIELD_SOURCE ];
$source = sanitize_text_field($_POST[ self::POST_FIELD_SOURCE ]);
} else {
$source = null;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment