Skip to content
Snippets Groups Projects

Added sanitization on posted AJAX data

Merged Krzysztof Dyszczyk requested to merge feature/sanitization into master
3 files
+ 7
2
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -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;
}
Loading