Skip to content

Commit 5e8537d

Browse files
committed
Sanitize array item values in modals.php: Use htmlspecialchars to prevent XSS vulnerabilities when displaying user input in settings.
1 parent 6397912 commit 5e8537d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modals.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
foreach ($value as $arrayKey => $arrayValue) {
164164
$input .= "
165165
<div class='input-group m-2 configListItem'>
166-
<input type='text' class='form-control settingInput' value='$arrayValue' data-key='".$key."-".$arrayKey."' placeholder='Array item $arrayKey'>
166+
<input type='text' class='form-control settingInput' value='".htmlspecialchars($arrayValue, ENT_QUOTES, 'UTF-8')."' data-key='".$key."-".$arrayKey."' placeholder='Array item $arrayKey'>
167167
<button type='button' class='btn btn-outline-danger btn-sm array-minus' data-key='$key'>
168168
<span aria-hidden='true'>&minus;</span>
169169
</button>

0 commit comments

Comments
 (0)