mirror of
https://github.com/unraid/webgui.git
synced 2026-01-04 08:29:51 -06:00
fix: Possible XSS via email test functionality
This commit is contained in:
@@ -40,7 +40,7 @@ function PsKill($pid) {
|
||||
if (PsExecute("$docroot/webGui/scripts/notify -s 'Unraid SMTP Test' -d 'Test message received!' -i 'alert' -l '/Settings/Notifications' -t")) {
|
||||
$result = exec("tail -3 /var/log/syslog|awk '/sSMTP/ {getline;print}'|cut -d']' -f2|cut -d'(' -f1");
|
||||
$color = strpos($result, 'Sent mail') ? 'green' : 'red';
|
||||
echo _("Test result")."<span class='$color'>$result</span>";
|
||||
echo _("Test result")."<span class='$color'>".htmlspecialchars($result)."</span>";
|
||||
} else {
|
||||
echo _("Test result")."<span class='red'>: "._('No reply from mail server')."</span>";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user