Bernd Wurst commited on 2019-08-20 19:00:51
Zeige 1 geänderte Dateien mit 8 Einfügungen und 1 Löschungen.
| ... | ... |
@@ -74,6 +74,13 @@ function verify_input_general($input) |
| 74 | 74 |
} |
| 75 | 75 |
|
| 76 | 76 |
|
| 77 |
+function filter_output_html($data) |
|
| 78 |
+{
|
|
| 79 |
+ return htmlspecialchars($data, ENT_QUOTES); |
|
| 80 |
+} |
|
| 81 |
+ |
|
| 82 |
+ |
|
| 83 |
+ |
|
| 77 | 84 |
function filter_input_username($input) |
| 78 | 85 |
{
|
| 79 | 86 |
$username=preg_replace("/[^[:alnum:]\_\.\+\-]/", "", $input);
|
| ... | ... |
@@ -215,7 +222,7 @@ function filter_ssh_key($key) |
| 215 | 222 |
function check_path($input) |
| 216 | 223 |
{
|
| 217 | 224 |
DEBUG("checking {$input} for valid path name");
|
| 218 |
- if ($input != filter_input_general($input)) {
|
|
| 225 |
+ if ($input != filter_output_html($input)) {
|
|
| 219 | 226 |
logger(LOG_WARNING, 'inc/security', 'check_path', 'HTML-Krams im Pfad: '.$input); |
| 220 | 227 |
DEBUG("HTML-Krams im Pfad");
|
| 221 | 228 |
return false; |
| 222 | 229 |