90 Commits

Author SHA1 Message Date
Benoît Bleuzé
970b61ac14 Handle empty "modified" ldap mapping
add the epoch origin modification date if the "modified" attribute is either
empty in the config file or is not returned by the request.
2016-09-14 23:18:29 +02:00
Florian Schlichting
0281a8d619 adapt to AWL function rename get_fields() -> awl_get_fields() 2016-06-13 22:02:47 +02:00
“Paul
e913676660 inc/drivers_ldap: fix 'Undefined variable' 2014-06-23 21:44:13 +02:00
“Paul
096594fac3 Support uniqueMember with DN for user names. 2014-06-23 20:28:08 +02:00
Ján Máté
6b8193ad9a added network timeout option for LDAP (thanks Sebastian Kotthoff) 2014-06-12 12:34:05 +02:00
Ján Máté
1330892852 fixed missing semicolons in drivers_ldap.php 2014-03-25 19:24:49 +01:00
Matthias Beyer
8ab19de1fe Added dbg_error_log() calls for error msgs
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.
2013-10-25 12:16:19 +13:00
Matthias Beyer
b732dcaeb3 Only set the cached instance if driver is valid
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.
2013-10-24 17:04:36 +13:00
Matthias Beyer
40c87435c1 Instance caching added
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...
2013-10-24 17:04:23 +13:00
Christoph Anton Mitterer
35e471013b support Apache’s REDIRECT_REMOTE_USER CGI env var
* 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.
2013-09-02 14:53:33 +12:00
Christoph Anton Mitterer
8e60bb3124 set line endings of most text files to LF
* 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
2013-09-02 14:37:23 +12:00
Andrew McMillan
8255f23256 Fix SQL fieldname. 2012-07-30 00:28:17 +12:00
Andrew McMillan
dbfd835488 Allow multiple LDAP fields to map to DAViCal fields. 2012-07-09 01:17:17 +12:00
Andrew McMillan
c846104d94 Those damn numeric usernames will get you every time. 2012-07-03 23:45:20 +12:00
Andrew McMillan
a267a25165 Retry contacting LDAP server and fail with 503 if unavailable.
We can't call $request->DoResponse() at this point because we haven't
done all that stuff yet...
2012-05-14 22:57:52 +12:00
Andrew McMillan
2ca6093e44 Reduce unnecessary logging. 2012-05-14 21:03:54 +12:00
Andrew McMillan
329f8b51dc LDAP driver should not log password unless password logging is specifically on. 2012-01-14 19:09:53 +13:00
Andrew McMillan
4a934c57b0 Remove password from LDAP log messages. 2011-11-25 08:18:44 +13:00
Andrew McMillan
3cc3396d67 Careless typos in code I can't execute :-( 2011-10-29 00:52:54 +13:00
Andrew McMillan
6dcdc9442f Fix missing bracket typo. 2011-10-29 00:48:23 +13:00
Andrew McMillan
384eabdff3 Allow LDAP sync to work if the date is reasonable and no 'format_updated' is set. 2011-10-28 14:30:55 +13:00
Andrew McMillan
1148f0cbc8 Catch more instances of deprecated mapping names. 2011-10-28 14:25:32 +13:00
Andrew McMillan
7cee724a87 Switch out deprecated LDAP mappings before we use them anywhere.
Otherwise the new ones aren't going to work properly!
2011-10-28 14:01:55 +13:00
Andrew McMillan
113a974799 Make sure the default relationships are created. 2011-10-18 16:39:54 +13:00
Andrew McMillan
70015d7c83 Working on fixing LDAP mappings. 2011-10-18 11:05:45 +13:00
Andrew McMillan
f0c609f169 We should map fields regardless of whether there are defaults set for anything.
They might all be mapped!
2011-10-18 10:53:03 +13:00
Andrew McMillan
3105b0a62d Fix handling of superseded defaults in LDAP field mapping. 2011-10-18 10:42:58 +13:00
Andrew McMillan
d7bd5cb7d1 Fix to not use deprecated call. 2011-10-10 13:47:56 +02:00
Andrew McMillan
963f23110d Hopefully nail that last LDAP niggle. 2011-09-24 12:57:14 +12:00
Andrew McMillan
df3a901c91 Rather than fixing in drivers_ldap, fix properly in Principal class.
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.
2011-09-22 09:40:10 +12:00
Andrew McMillan
fe659b4aaa Set 'active' and 'default_privileges' fallback values. 2011-09-22 07:53:04 +12:00
Andrew McMillan
1a35a111e7 Ensure username is initialised to something appropriate.
Per:
http://sourceforge.net/tracker/?func=detail&atid=890787&aid=3409180&group_id=179845
2011-09-14 23:03:44 +12:00
Andrew McMillan
f71859792b Handle empty groups better. 2011-09-13 08:09:50 +12:00
Andrew McMillan
997650ce79 Call method correctly. 2011-09-12 19:48:46 +12:00
Andrew McMillan
42690f8b5c A more complete fix for weird passwords with LDAP.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-03-13 05:05:19 +13:00
Andrew McMillan
ad061af4ed Apparently an attempt to bind with an empty password will return TRUE!
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-03-13 04:28:14 +13:00
Andrew McMillan
02182cf087 Remove duplicate constructor thinko.
Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-11 10:10:59 +13:00
Andrew McMillan
20ee255898 Refactor fetching of Principal records from database.
This is a significant refactoring, replacing the old getUserBy*()
functions with a new Principal class, and replacing the old
CalDAVPrincipal class with a new DAVPrincipal class which extends
the Principal class.

At this point all regression tests pass (again) but there could
well be issues for people who use alternative authenticators
such as LDAP, although I have endeavoured to resolve those
potential issues.

Signed-off-by: Andrew McMillan <andrew@morphoss.com>
2011-01-03 10:16:43 +13:00
Andrew McMillan
77de9a024e Fix SQL for group handling from Michael Braun. 2010-11-21 00:57:14 +13:00
Jens Zahner
f6fd2d39aa Fixes to LDAP group handling by Jens Zahner 2010-08-14 13:11:04 +12:00
Andrew McMillan
22755fc766 Remove uninitialised variable possibility. 2010-06-29 23:48:43 +12:00
Rob Ostensen
34c1fee3c6 first run at ldap group support 2010-03-21 20:42:03 +13:00
Rob Ostensen
ca04a4a42e warn if there are no active admin users 2010-03-18 23:52:40 +13:00
Andrew McMillan
be7e713c69 Fix deactivation of users no longer in LDAP. 2010-03-18 23:12:31 +13:00
Andrew McMillan
a577a44a51 Siwtch to use an object for the updated users row. 2010-03-18 23:08:00 +13:00
Andrew McMillan
c4917a7e6e A more readable fix that might even be faster... 2010-03-18 22:45:30 +13:00
Andrew McMillan
eb77858c5b D'oh! 2010-03-18 22:30:56 +13:00
Andrew McMillan
390bc17209 Switching to AwlQuery. 2010-03-17 11:51:35 +13:00
Andrew McMillan
c90faa12ba No dependence on DAViCalUser.php is needed any longer. 2010-03-16 10:13:21 +13:00
Andrew McMillan
41766218a5 Add a config item to exclude some users from LDAP sync. 2010-02-25 21:19:08 +13:00