Deprecated: Required parameter $username follows optional parameter $attributes in inc/drivers_ldap.php on line 190
Deprecated: Required parameter $passwd follows optional parameter $attributes in inc/drivers_ldap.php on line 190
Deprecated: Required parameter $ua_string follows optional parameter $min_age in inc/external-fetch.php on line 42
As explained in https://www.php.net/manual/en/migration80.deprecated.php,
If a parameter with a default value is followed by a required
parameter, the default value has no effect. This is deprecated as of
PHP 8.0.0 and can generally be resolved by dropping the default
value, without a change in functionality
despite its name, $c->do_not_sync_from_ldap did not stop accounts in
LDAP from being created in Davical, it only stopped accounts not in LDAP
from being deactived in Davical (like a local admin account)
The checks to test if a "modified" attribute was found in the
$valid array used in_array, which fails.
Replace this with array_key_exists calls.
This fixes https://gitlab.com/davical-project/davical/issues/108
[ $mapping['modified'] is a key in $valid, not a value. This is a
regression introduced in 970b61ac, for 1.1.5 ]
If the ldap driver is not valid, the error messages were not printed.
There was just "Couldn't contact LDAP server for authentication" - But
why?
This commit adds a print loop for all messages from the global
$c->messages message array.
As I could see at other locations in the code, the ldap driver instance
can be invalid. And if the instance is invalid, the getStaticLdap()
function gets called again. Caching would prevent the function from
retrying to initiate the ldapDrivers object.
This commit adds conditional caching: only if the ldap driver instance is
valid, the object gets cached. This ensures that a retry with this function
would really try to create a new ldapDrivers object and not simply
return the (invalid) cached one.
There was already a variable to cache the ldap driver instance, and a
check if this variable was already set was there, too! But there was no
code to return the cached instance if the function gets called twice!
Maybe this was simply forgotten...
* In places where the CGI variable REMOTE_USER is read, support alternatively
REDIRECT_REMOTE_USER, which is used by the Apache HTTPD Server instead, when a
redirect was used.
Note: This alone is not enough yet, to fully support it in DAViCal. An analogous
change (commit 29ddd89baaf65bda2560e51665a2e761abef4147) is necessary in
AWL.
* Changed the end-of-line encodings of all non-Windows-related and non-autogenerated text files to use UNIX LF (lots of them had mixed LF/CRLF).
Conflicts:
inc/caldav-PUT-functions.php
This fixes a bug in the Principal class when updating where
fields are set on the principal, but are not being updated and
end up getting set to NULL as a result.