Skip to content

Commit

Permalink
make proper message for weak passwords
Browse files Browse the repository at this point in the history
add first release build
update description
  • Loading branch information
silentsakky committed Dec 17, 2013
1 parent 67e7a25 commit d2dd91c
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 1.0 (17th Dec 2013)

- Password change functionality when using DB or LDAP plugin
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,38 @@
zarafa-webapp-passwd
====================

Plugin to add functionality of changing of password from zarafa webapp
The Passwd plugin allows the user to change his password inside of WebApp.

This plugin is largely based on the "Passwd" plugin by
Andreas Brodowski. For his original check this link https://community.zarafa.com/pg/plugins/project/157/developer/dw2412/passwd-plugin
This plugin is largely based on the "Passwd" plugin by Andreas Brodowski.
For his original work check this [link](https://community.zarafa.com/pg/plugins/project/157/developer/dw2412/passwd-plugin)

## How to install
1. If you want to use this plugin with production / debug version of webapp then please download package from [community](__link_to_come__)
2. If you want to use this plugin with source copy of webapp then you can just download this whole project
3. Extract contents of this plugin to <webapp_path>/plugins directory
4. Give read permissions to apache for <webapp_path>/plugins/passwd directory
5. If you are using LDAP plugin then change PLUGIN_PASSWD_LDAP to true and also set proper values for PLUGIN_PASSWD_LDAP_BASEDN and PLUGIN_PASSWD_LDAP_URI configurations
6. If you are using DB plugin then no need to change anything, default configurations should be fine
5. Restart apache, reload webapp after clearing cache
6. If you want to enable this plugin by default for all users then edit config.php file and change PLUGIN_PASSWD_USER_DEFAULT_ENABLE setting to true

## How to enable
1. Go to settings section
2. Go to Plugins tab
3. Enable password change plugin and reload webapp
4. Go to Change Password tab of settings section
5. Provide current password and new password
6. Click on apply

## How to disable
1. Go to settings section
2. Go to Plugins tab
3. Disable password change plugin and reload webapp

## Notes
- Feedback/Bug Reports are welcome
- if anyone is good at creating icons then please help me add a good icon to change password tab (credits will be given)

## Todo
- add password strength meter on client side, so user can create complex passwords
- check on client side for empty fields
Binary file added builds/passwd-1.0.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion config.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/** Enable the passwd plugin for all clients **/
define('PLUGIN_PASSWD_USER_DEFAULT_ENABLE', true);
define('PLUGIN_PASSWD_USER_DEFAULT_ENABLE', false);

/** Define zarafa installtion uses LDAP **/
define('PLUGIN_PASSWD_LDAP', false);
Expand Down
4 changes: 2 additions & 2 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!DOCTYPE plugin SYSTEM "manifest.dtd">
<plugin version="2">
<info>
<version>0.2</version>
<version>1.0</version>
<name>Passwd</name>
<title>Password Changer Plugin</title>
<title>Password Change Plugin</title>
<author>Saket Patel</author>
<authorURL>https://github.com/silentsakky</authorURL>
<description>Change your password from zarafa webapp</description>
Expand Down
6 changes: 3 additions & 3 deletions php/class.passwdmodule.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function saveInLDAP($data)
$errorMessage = _('Password is not changed.');
}
} else {
$errorMessage = _('Password is weak.');
$errorMessage = _('Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
}
} else {
$errorMessage = _('Current password does not match.');
Expand Down Expand Up @@ -178,7 +178,7 @@ public function saveInDB($data)
$errorMessage = _('Password is not changed.');
}
} else {
$errorMessage = _('Password is weak.');
$errorMessage = _('Password is weak. Password should contain capital, non capital letters and numbers. Password shuold have 8 to 20 characters.');
}

if(!empty($errorMessage)) {
Expand All @@ -196,7 +196,7 @@ public function saveInDB($data)
* will return false.
* Password should meet the following criteria:
* - min. 8 chars, max. 20
* - contain caps und noncaps characters
* - contain caps and noncaps characters
* - contain numbers
* @param {String} $password password which should be checked.
* @return {Boolean} true if password passes the minimum requirement else false.
Expand Down

0 comments on commit d2dd91c

Please sign in to comment.