1
0
Fork 0
mirror of https://github.com/dducret/kopano-webapp-passwd synced 2026-07-27 18:42:47 +02:00

Merge pull request #9 from robert-scheck/master

Security fix for DB backend, typo correction and German translation
This commit is contained in:
Saket Patel 2015-02-18 00:49:38 +05:30
commit d5a505c131
3 changed files with 102 additions and 12 deletions

View file

@ -0,0 +1,93 @@
msgid ""
msgstr ""
"Project-Id-Version: zarafa-webapp-plugin-passwd\n"
"POT-Creation-Date: 2014-03-04 13:53+0100\n"
"PO-Revision-Date: 2014-03-04 14:34+0100\n"
"Last-Translator: Robert Scheck <zarafa@robert-scheck.de>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: de\n"
# php/class.passwdmodule.php:44:
msgid "No data received."
msgstr "Keine Daten empfangen!"
# php/class.passwdmodule.php:48:
msgid "User name is empty."
msgstr "Benutzername ist leer!"
# php/class.passwdmodule.php:52:
msgid "Current password is empty."
msgstr "Aktuelles Passwort ist leer!"
# php/class.passwdmodule.php:56:
msgid "New password is empty."
msgstr "Neues Passwort ist leer!"
# php/class.passwdmodule.php:60:
msgid "New passwords do not match."
msgstr "Neue Passwörter stimmen nicht überein!"
# php/class.passwdmodule.php:137:
# php/class.passwdmodule.php:196:
# js/data/PasswdResponseHandler.js:44:
msgid "Password is changed successfully."
msgstr "Passwort wurde erfolgreich geändert!"
# php/class.passwdmodule.php:141:
# php/class.passwdmodule.php:200:
msgid "Password is not changed."
msgstr "Passwort wurde nicht geändert!"
# php/class.passwdmodule.php:144:
# php/class.passwdmodule.php:203:
msgid ""
"Password is weak. Password should contain capital, non-capital letters and "
"numbers. Password should have 8 to 20 characters."
msgstr ""
"Das eingegebene Passwort ist schwach; es sollte große und kleine Buchstaben "
"sowie Ziffern enthalten und zwischen 8 und 20 Zeichen lang sein!"
# php/class.passwdmodule.php:147:
msgid "Current password does not match."
msgstr "Aktuelles Passwort ist falsch!"
# js/data/PasswdResponseHandler.js:27:
msgid "An unknown error occurred while changing password."
msgstr "Beim Ändern des Passworts ist ein unbekannter Fehler aufgetreten!"
# js/data/PasswdResponseHandler.js:33:
msgid "Error"
msgstr "Fehler"
# js/data/PasswdResponseHandler.js:50:
msgid "Success"
msgstr "Erfolg"
# js/settings/SettingsPasswdWidget.js:24:
# js/settings/SettingsPasswdCategory.js:20:
msgid "Change Password"
msgstr "Passwort ändern"
# js/PasswdPlugin.js:50:
msgid "Password Change Plugin"
msgstr "Passwortänderungsplugin"
# js/settings/PasswdPanel.js:29:
msgid "User name"
msgstr "Benutzername"
# js/settings/PasswdPanel.js:33:
msgid "Current password"
msgstr "Aktuelles Passwort"
# js/settings/PasswdPanel.js:42:
msgid "New password"
msgstr "Neues Passwort"
#js/settings/PasswdPanel.js:51:
msgid "Retype new password"
msgstr "Wiederholung"

View file

@ -1,6 +1,6 @@
msgid ""
msgstr ""
"Project-Id-Version: zarafa-webap-plugin-passwd\n"
"Project-Id-Version: zarafa-webapp-plugin-passwd\n"
"POT-Creation-Date: 2014-03-04 13:53+0100\n"
"PO-Revision-Date: 2014-03-04 14:34+0100\n"
"Last-Translator: Sander Hoentjen <sander@hoentjen.eu>\n"
@ -46,8 +46,8 @@ msgstr "Wachtwoord is niet aangepast."
# php/class.passwdmodule.php:144:
# php/class.passwdmodule.php:203:
msgid ""
"Password is weak. Password should contain capital, non capital letters and "
"numbers. Password shuold have 8 to 20 characters."
"Password is weak. Password should contain capital, non-capital letters and "
"numbers. Password should have 8 to 20 characters."
msgstr ""
"Wachtwoord is zwak. Een wachtwoord moet hoofdletters, kleine letters en "
"cijfers bevatten. Een wachtwoord moet 8 tot 20 karakters bevatten."

View file

@ -141,7 +141,7 @@ class PasswdModule extends Module
$errorMessage = dgettext("plugin_passwd", 'Password is not changed.');
}
} else {
$errorMessage = dgettext("plugin_passwd", 'Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
$errorMessage = dgettext("plugin_passwd", 'Password is weak. Password should contain capital, non-capital letters and numbers. Password should have 8 to 20 characters.');
}
} else {
$errorMessage = dgettext("plugin_passwd", 'Current password does not match.');
@ -165,8 +165,7 @@ class PasswdModule extends Module
}
/**
* Function will execute zarafa-passwd command and will try to change user's password,
* this method is unsecure and unreliable.
* Function will try to change user's password via MAPI in SOAP connection.
* @param {Array} $data data sent by client.
*/
public function saveInDB($data)
@ -176,13 +175,11 @@ class PasswdModule extends Module
$passwdRepeat = $data['new_password_repeat'];
if($this->checkPasswordStrenth($passwd)) {
$passwd_cmd = '/usr/bin/zarafa-passwd -u %s -o %s -p %s';
// all information correct, change password
$cmd = sprintf($passwd_cmd, $data['username'], $data['current_password'], $passwd);
exec($cmd, $arrayout, $retval);
$store = $GLOBALS['mapisession']->getDefaultMessageStore();
$userinfo = mapi_zarafa_getuser_by_name($store, $data['username']);
if ($retval === 0) {
if (mapi_zarafa_setuser($store, $userinfo['userid'], $data['username'], $userinfo['fullname'], $userinfo['emailaddress'], $passwd, 0, $userinfo['admin'])) {
// password changed successfully
// write new password to session because we don't want user to re-authenticate
@ -200,7 +197,7 @@ class PasswdModule extends Module
$errorMessage = dgettext("plugin_passwd", 'Password is not changed.');
}
} else {
$errorMessage = dgettext("plugin_passwd", 'Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
$errorMessage = dgettext("plugin_passwd", 'Password is weak. Password should contain capital, non-capital letters and numbers. Password should have 8 to 20 characters.');
}
if(!empty($errorMessage)) {