Arthur Schiwon
ea62d7a9f5
constants belong to Util in 13
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-07-02 12:51:51 +02:00
Arthur Schiwon
56aaa40dde
lower log level for quota manipulation cases
...
and simplify the forest of ifs a little bit
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-07-02 11:53:49 +02:00
Arthur Schiwon
993342f6a1
LDAP backup server should not be queried when auth fails
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-06-27 23:15:44 +02:00
Roland Tapken
ed78703275
dn2ocname: also apply group filter to readAttribute()
...
Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
2018-06-12 18:21:22 +02:00
Roland Tapken
57a8fa1b22
Apply ldapUserFilter on members of group
...
Refers to issue #8220
user_ldap configured with custom filters for active directory access
(group-member-association is "member"). Then it can happen that the
members of a group contain members that don't belong to the users
available in Nextcloud (the most trivial reason is that the user filter
contains "(!(UserAccountControl:1.2.840.113556.1.4.803:=2))" to exclude
disabled users from being imported).
This can be fixed by applying the ldapUserFilter when resolving the UID
for a DN fetched from the group's member list.
Signed-off-by: Roland Tapken <roland@bitarbeiter.net>
2018-06-12 18:21:11 +02:00
Morris Jobke
4c1f88efb1
Merge pull request #9654 from nextcloud/backport/9360/stable13
...
[stable13] Fix "Invalid argument supplied for foreach()"
2018-05-30 11:50:35 +02:00
Arthur Schiwon
d33ba08b05
check user state when fetching to avoid dealing with offline objects
...
fixes #9502
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-05-29 20:54:48 +02:00
Roger Szabo
27fca0eebc
Fix "Invalid argument supplied for foreach()"
...
Signed-off-by: Roger Szabo <roger.szabo@web.de>
2018-05-29 15:21:19 +02:00
Roger Szabo
8c43834dbc
unbound cloned connection fix
...
Signed-off-by: Roger Szabo <roger.szabo@web.de>
2018-05-18 15:09:51 +02:00
Arthur Schiwon
588ee6af06
existence check works without attribute (like with users)
...
cn is not necessarily given everywhere
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-03-16 10:26:29 +01:00
Arthur Schiwon
6e3c05f513
do not create empty userid when attribute does not have allowed chars
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-03-05 23:14:36 +01:00
Arthur Schiwon
962b046ab5
use hash algo that's robust against collisions
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-03-05 13:20:22 +01:00
Morris Jobke
88ece3f5d7
Merge pull request #8532 from nextcloud/8499-stable13
...
[stable13] Avoid fruitless login attempts
2018-02-26 15:10:52 +01:00
Arthur Schiwon
8acec5309c
fix retrieving group members with numerical uids from LDAP
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-02-26 13:33:35 +01:00
Arthur Schiwon
f015d38a89
track the state of the bind result
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-02-26 10:32:31 +01:00
Arthur Schiwon
d61dd36fdd
do not catch ServerNotAvailable
...
might cause the user to be unavailable (race condition).
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-26 15:35:26 +01:00
Arthur Schiwon
f84ec92563
revert resolving of recursion ( 3628d4d65d
)
...
without recursion we have issues with internal states. paged search status
are set to false, cookies are not being set. In the end we have endless
requests which pile up enormously with a high initial offset.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-11 15:17:18 +01:00
Arthur Schiwon
9031ae0281
fix return value when ldapPagingSize returns null
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-11 14:47:51 +01:00
Arthur Schiwon
15a3f4659f
enrich log message with backtrace, but level it down to DEBUG
...
The message is not helpful anyway for an admin, and oftentimes is just
valid (e.g. when searching with an offset beyond users in LDAP).
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-11 14:17:14 +01:00
Arthur Schiwon
f292f98060
when paged results are turned off, all (max possible) users are returned
...
thus hasMoreResult should return false
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-11 13:20:17 +01:00
Arthur Schiwon
7c3db54ff6
fix changing to next cycle
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-08 13:45:06 +01:00
Arthur Schiwon
b17c5fec40
add unit test for qualifies to run
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-08 13:08:59 +01:00
Arthur Schiwon
a565bf0b9f
fix offset is never being reset
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-05 14:29:11 +01:00
Arthur Schiwon
82da4fde18
create failing test for this case
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-05 14:27:36 +01:00
Morris Jobke
4d0315ceae
Merge pull request #7599 from nextcloud/quieter-debug-log
...
don't show recurring log msg when paged result was turned off
2018-01-03 00:40:46 +01:00
Arthur Schiwon
c8851e24a8
throw ServerNotAvailableException when LDAP is caught shutting down
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2018-01-02 12:20:44 +01:00
Arthur Schiwon
82fd09c294
don't show recurring msg when pages result was turned off
...
and only as debug level otherwise.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-12-21 14:29:56 +01:00
Morris Jobke
d2d73f1ce8
Also replace all other occurences
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-12-18 20:57:11 +01:00
Arthur Schiwon
5ce943aa85
don't use deprecated method for requesting memcache
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-12-18 20:57:11 +01:00
Morris Jobke
defac0ff0d
Fixes hex2bin() in LDAP
...
Untangles the two if-else clauses into a more readable format.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-12-13 11:57:49 +01:00
Arthur Schiwon
27f14eee26
don't cache user, if no internal user id was retrieved/assigned
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-12-07 22:47:32 +01:00
Arthur Schiwon
991190b994
ensure that users are cached when they are retrieved
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-12-07 17:49:33 +01:00
sidey79
45dfc11137
tryfix needsRefresh unit tests
...
Forced updateAttributesInterval from getAppValue to int
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-10 17:07:41 +01:00
sidey79
039f6c9636
Fixed Typo in user.php
...
Fixed a typo for the app config prameter updateAttributesInterval
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-10 17:07:41 +01:00
sidey79
0b290c0904
Update User.php
...
Makes the time between needsRefresh configurable via app config option updateAttribuesInterval.
Default is still 86400 secons which is one day.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-10 17:07:36 +01:00
Arthur Schiwon
419759e68b
resolve DI
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:59 +01:00
Arthur Schiwon
8113f26eed
add Sync test
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:58 +01:00
Arthur Schiwon
59c05d5447
move LDAP user attributes "sync" to background (except for ajax jobs)
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:56 +01:00
Arthur Schiwon
ef3cd32916
don't skip updating when ajax is set as background job mode
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:10:04 +01:00
Arthur Schiwon
c6f1af9896
move ldap user sync to background (WIP)
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-11-09 11:09:59 +01:00
Lukas Reschke
2bfa1ce5c3
Merge pull request #5568 from nextcloud/ldap-agent-credentials-safe
...
Ldap agent credentials save
2017-11-09 09:26:51 +01:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Vinicius Cubas Brand
fa565750d1
User_LDAP plugins: smaller fixes
...
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2017-11-03 11:42:59 -02:00
Vinicius Cubas Brand
10ca793452
Plugins infrastructure in User_LDAP
...
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2017-11-03 11:41:40 -02:00
Arthur Schiwon
7b0868ddac
fix saving changes…
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-27 14:25:19 +02:00
Arthur Schiwon
9a1f706ae4
fix creating an empty configuration
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-27 14:25:19 +02:00
Arthur Schiwon
52b1b97c58
Fix regression: undesired writes to the DB
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-27 14:25:19 +02:00
Arthur Schiwon
4eab39f133
LDAP: only write actually changes values to the DB
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-27 14:25:19 +02:00
Arthur Schiwon
3628d4d65d
avoid unnecessary recursion
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2017-10-25 17:23:42 +02:00
Lukas Reschke
9932b7498d
Merge pull request #6873 from nextcloud/ldap_proxy_redix_fix
...
Ldap proxy Redis fix
2017-10-19 12:03:04 +02:00