format_updated not applied to modified field in 1.1.5? Fails to add principal
Hi,
In our davical configuration we have in our LDAP settings the following mappings defined:
'mapping_field' => array("username" => "uid", "modified" => "modifyTimestamp", "fullname" => "cn", "user_no" => "uidNumber", "email" => "mail" ), 'format_updated' => array('Y' => array(0,4),'m' => array(4,2),'d'=> array(6,2),'H' => array(8,2),'M'=>array(10,2),'S' => array(12,2)),
This works for the Debian 1.1.3 package when a new user is added to davical:
[Tue Feb 28 16:27:32.167596 2017] [:error] [pid 13378] [client 10.33.138.9:54790] davical: ALL: LDAP:user rik doesn't exist in local DB, we need to create it, referer: https://cal.example.com/index.php ... [Tue Feb 28 16:27:32.167643 2017] [:error] [pid 13378] [client 10.33.138.9:54790] davical: ALL: LDAP:Setting usr->modified to 2017-02-17 06:52:20 from LDAP field modifyTimestamp, referer: https://cal.example.com/index.php
The value in LDAP for the modifyTimestamp attribute is 20170217065220Z, which is translated to '2017-02-17 06:52:20' in the 1.1.3 release.
When I install the 1.1.5 Debian backport package, adding the same user (on an empty installation) fails as the modifyTimestamp is not translated and the INSERT fails:
[Wed Mar 01 09:14:10.406169 2017] [:error] [pid 14039] [client 10.33.138.9:59144] davical: ALL: LDAP:user rik doesn't exist in local DB, we need to create it, referer: https://cal.example.com/index.php [Wed Mar 01 09:14:10.406195 2017] [:error] [pid 14039] [client 10.33.138.9:59144] davical: ALL: LDAP:Going to sync the user from LDAP, referer: https://cal.example.com/index.php ... [Wed Mar 01 09:14:10.406249 2017] [:error] [pid 14039] [client 10.33.138.9:59144] davical: ALL: LDAP:Setting usr->modified to 20170217065220Z from LDAP field modifyTimestamp, referer: https://cal.example.com/index.php
Since it is not translated into a value postgresql understands, it fails:
[Wed Mar 01 09:14:10.406862 2017] [:error] [pid 14039] [client 10.33.138.9:59144] davical: LOG: Principal: Query: QF: SQL error "22008" - ERROR: date/time field value out of range: "20170217065220Z" LINE 1: ...VALUES('rik','Rik.Theys@example.com',TRUE,'201702170... ^ HINT: Perhaps you need a different "datestyle" setting.", referer: https://cal.example.com/index.php
If the same configuration is used on 1.1.3 it works and the user is added. If I then upgrade to 1.1.5 the user can still login as the principal is already in the database. But when the principal doesn't exist, this fails.
Regards,
Rik