Fix: Reading Share Settings from Share containing ' crashes the share

Root cause is that arguments passed to mk_option() should be sanitized via htmlspecialchars().
This commit is contained in:
Tom Mortensen
2025-09-05 10:30:14 -07:00
parent 34be5b3c23
commit 2cc687c64f

View File

@@ -180,6 +180,8 @@ function my_error($code) {
}
function mk_option($select, $value, $text, $extra="") {
$value = htmlspecialchars($value);
$text = htmlspecialchars($text);
return "<option value='$value'".($value == $select ? " selected" : "").(strlen($extra) ? " $extra" : "").">$text</option>";
}