avoid possible html injection via forgot-password-error-message

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-11-05 12:51:23 +01:00
parent 4a4188a96b
commit 4fc50fba1f
3 changed files with 3 additions and 6 deletions

View File

@@ -356,12 +356,7 @@ if ($action == '2fa_entercode') {
$message = lng('error.login_blocked', [Settings::Get('login.deactivatetime')]);
break;
case 4:
$cmail = isset($_GET['customermail']) ? $_GET['customermail'] : 'unknown';
if (!Validate::validateEmail($cmail)) {
$message = lng('error.errorsendingmail', ['invalid.address']);
} else {
$message = lng('error.errorsendingmail', [$cmail]);
}
$message = lng('error.errorsendingmailpub');
break;
case 5:
$message = lng('error.user_banned');

View File

@@ -799,6 +799,7 @@ return [
'nomessagetosend' => 'Keine Nachricht angegeben',
'norecipientsgiven' => 'Keine Empfänger angegeben',
'errorsendingmail' => 'Das Versenden der Nachricht an "%s" schlug fehl.',
'errorsendingmailpub' => 'Das Versenden der Nachricht an die angegebene E-Mail Adresse schlug fehl.',
'cannotreaddir' => 'Der Ordner "%s" kann nicht gelesen werden',
'invalidip' => 'Ungültige IP-Adresse: "%s"',
'invalidmysqlhost' => 'Ungültige MySQL-Host-Adresse: "%s"',

View File

@@ -864,6 +864,7 @@ return [
'nomessagetosend' => 'You did not enter a message.',
'norecipientsgiven' => 'You did not specify any recipient',
'errorsendingmail' => 'The message to "%s" failed',
'errorsendingmailpub' => 'The message to the given email-address failed',
'cannotreaddir' => 'Unable to read directory "%s"',
'invalidip' => 'Invalid IP address: %s',
'invalidmysqlhost' => 'Invalid MySQL host address: %s',