If the password policy on the ldap server is violated when changing
password, report error as "constraint violation" instead of the
misleading "connection error".
Only tested with OpenLDAP (v2.4).
The old version assumed `json_decode` would return an associative array.
While it can do so if an extra option is specified, the default
behaviour is to return an object. Therefore, a successful password
change resulted in an error while parsing the response.
The new code is accessing the response as object instead. The method
is now covered by a unit test.
This driver does not use an admin account. It uses the user's account to
authenticate at the Webmail API. It uses the recommended UAPI and does
not rely on third-party classes.
Squashed commit of the following:
commit 41283ecab18321201c3adfef8e964e2aa0dc2032
Author: Aleksander Machniak <alec@alec.pl>
Date: Sat Oct 15 08:37:31 2016 +0200
CS fixes after PR merge, renamed session variable
commit b4440a0c4d15c194619c003683ff0d36787f82a8
Merge: cf9f0d85dee181
Author: Aleksander Machniak <alec@alec.pl>
Date: Sat Oct 15 08:26:04 2016 +0200
Merge branch 'master' of https://github.com/ZiBiS/roundcubemail into ZiBiS-master
commit 5dee1812e7
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Thu Oct 13 14:20:14 2016 +0200
passing by session
commit 6ccb7e7d1d
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Thu Oct 13 11:45:43 2016 +0200
formatted passwdexpdatetime should be set in session data
commit a43f30fdfc
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Thu Oct 13 11:10:06 2016 +0200
_passwdexpwarning removed and expdatetime object is stored in session
commit 62ef852a11
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Thu Oct 13 10:24:39 2016 +0200
String concatenation is removed and expdatetime is passed via session
data.
commit 2aea3a4e85
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Wed Oct 12 10:20:58 2016 +0200
Removing ppolicy plugin from my repository.
commit 8848c944ab
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Tue Oct 11 11:32:37 2016 +0200
little correction of variables names
commit 5266c89da9
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Tue Oct 11 11:14:17 2016 +0200
little corrections
commit c665b5c607
Author: Zbigniew Szmyd <zbigniew.szmyd@linseco.pl>
Date: Tue Oct 11 10:31:05 2016 +0200
A plugin to check LDAP password for expiration