Skip to content

Commit

Permalink
Replace undocumented 'FILTER_SANITIZE_FULL_SPECIAL_CHARS' filter by c…
Browse files Browse the repository at this point in the history
…ommon 'FILTER_UNSAFE_RAW' filter
  • Loading branch information
7-zete-7 committed Apr 5, 2023
1 parent 1ce449e commit fb284ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PAMI/Message/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected function sanitizeInput($value)
if (strcasecmp($value, 'off') === 0 || strcasecmp($value, 'false') === 0 || strcasecmp($value, 'no') === 0) {
return (boolean)false;
}
if (filter_var($value, FILTER_SANITIZE_FULL_SPECIAL_CHARS, FILTER_NULL_ON_FAILURE)) {
if (filter_var($value, FILTER_UNSAFE_RAW, FILTER_NULL_ON_FAILURE)) {
return (string)htmlspecialchars($value, ENT_QUOTES);
}
throw new PAMIException("Incoming String is not sanitary. Skipping: '" . $value . "'\n");
Expand Down

0 comments on commit fb284ae

Please sign in to comment.