From 6e4ff4705bccc9b910b2b0a06f1c48a5a012262f Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Sat, 17 May 2014 19:10:28 +0200 Subject: [PATCH] just because people are stupid...really, there are people doing this - thanks for a wonderful afternoon fighting spam Signed-off-by: Michael Kaufmann (d00p) --- customer_ftp.php | 5 +++++ lng/english.lng.php | 1 + lng/german.lng.php | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/customer_ftp.php b/customer_ftp.php index 7385f710..f2886b44 100644 --- a/customer_ftp.php +++ b/customer_ftp.php @@ -192,6 +192,8 @@ if ($page == 'overview') { standard_error(array('stringisempty', 'mypassword')); } elseif ($path == '') { standard_error('patherror'); + } elseif ($username == $password) { + standard_error('passwordshouldnotbeusername'); } else { $path = makeCorrectDir($userinfo['documentroot'] . '/' . $path); @@ -362,6 +364,9 @@ if ($page == 'overview') { if ($password == '') { standard_error(array('stringisempty', 'mypassword')); exit; + } elseif ($result['username'] == $password) { + standard_error('passwordshouldnotbeusername'); + exit; } $log->logAction(USR_ACTION, LOG_INFO, "updated ftp-account password for '" . $result['username'] . "'"); $cryptPassword = makeCryptPassword($password); diff --git a/lng/english.lng.php b/lng/english.lng.php index fe4cbdd4..fb436222 100644 --- a/lng/english.lng.php +++ b/lng/english.lng.php @@ -1817,3 +1817,4 @@ $lng['error']['cannotdeletehostnamephpconfig'] = 'This PHP-configuration is used $lng['error']['cannotdeletedefaultphpconfig'] = 'This PHP-configuration is set as default and cannot be deleted.'; $lng['serversettings']['system_cron_allowautoupdate']['title'] = 'Allow automatic database updates'; $lng['serversettings']['system_cron_allowautoupdate']['description'] = '
ATTENTION:
This settings allows the cronjob to bypass the version-check of froxlors files and database and runs the database-updates in case a version-mismatch occurs.

Auto-update will always set default values for new settings or changes. This might not always suite your system. Please think twice before activating this option
'; +$lng['error']['passwordshouldnotbeusername'] = 'The password should not be the same as the username.'; diff --git a/lng/german.lng.php b/lng/german.lng.php index fdd1cb41..1170f185 100644 --- a/lng/german.lng.php +++ b/lng/german.lng.php @@ -1540,4 +1540,5 @@ $lng['serversettings']['system_croncmdline']['description'] = 'Befehl zum Ausfü $lng['error']['cannotdeletehostnamephpconfig'] = 'Diese PHP-Konfiguration ist dem Froxlor-Vhost zugewiesen und kann daher nicht gelöscht werden.'; $lng['error']['cannotdeletedefaultphpconfig'] = 'Diese PHP-Konfiguration ist als Standard hinterlegt und kann daher nicht gelöscht werden.'; $lng['serversettings']['system_cron_allowautoupdate']['title'] = 'Erlaube automatische Datenbank-Aktualisierungen'; -$lng['serversettings']['system_cron_allowautoupdate']['description'] = '
WARNUNG:
Diese Einstellung erlaubt es dem Cronjob die Prüfung der Dateien- und Datenbank-Version zu umgehen und bei einem Versions-Unterschied die Datenbank-Aktualisierungen automatisiert auszuführen.

Das automatische Update setzt für neue Einstellungen und Änderungen immer die default-Werte. Diese müssen nicht zwingend zu dem genutzten System passen. Bitte zwei mal nachdenken, bevor diese Option aktiviert wird.
'; \ No newline at end of file +$lng['serversettings']['system_cron_allowautoupdate']['description'] = '
WARNUNG:
Diese Einstellung erlaubt es dem Cronjob die Prüfung der Dateien- und Datenbank-Version zu umgehen und bei einem Versions-Unterschied die Datenbank-Aktualisierungen automatisiert auszuführen.

Das automatische Update setzt für neue Einstellungen und Änderungen immer die default-Werte. Diese müssen nicht zwingend zu dem genutzten System passen. Bitte zwei mal nachdenken, bevor diese Option aktiviert wird.
'; +$lng['error']['passwordshouldnotbeusername'] = 'Das Passwort sollte nicht mit dem Benutzernamen übereinstimmen.';