Skip to content

Commit fa93239

Browse files
committed
fix: Possible XSS via email test functionality
1 parent 957fa3a commit fa93239

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

emhttp/plugins/dynamix/include/SMTPtest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function PsKill($pid) {
4040
if (PsExecute("$docroot/webGui/scripts/notify -s 'Unraid SMTP Test' -d 'Test message received!' -i 'alert' -l '/Settings/Notifications' -t")) {
4141
$result = exec("tail -3 /var/log/syslog|awk '/sSMTP/ {getline;print}'|cut -d']' -f2|cut -d'(' -f1");
4242
$color = strpos($result, 'Sent mail') ? 'green' : 'red';
43-
echo _("Test result")."<span class='$color'>$result</span>";
43+
echo _("Test result")."<span class='$color'>".htmlspecialchars($result)."</span>";
4444
} else {
4545
echo _("Test result")."<span class='red'>: "._('No reply from mail server')."</span>";
4646
}

0 commit comments

Comments
 (0)