Skip to content
Snippets Groups Projects
Commit be594106 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
No related merge requests found
variables:
DISABLE_FUNCTIONAL: 1
DISABLE_ACCEPTANCE: 1
DISABLE_CODECEPTION: 1
IS_LIBRARY: 1
include: 'https://gitlab.com/wpdesk/gitlab-ci/raw/master/gitlab-ci-1.2.yml'
......
## [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.
Finish editing this message first!
Please register or to comment