Commit graph

1095 commits

Author SHA1 Message Date
Côme Chilliet
71e2af3d97 fix(user_ldap): Early failure for empty password login attempt
This avoids user_ldap logging about an invalid configuration with an
 empty password when the empty password actually comes from a login
 attempt.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-03-07 09:59:37 +00:00
Arthur Schiwon
fd5a22044b
fix undefined method getExtStorageHome()
- adds a type check
- defines missing method in OfflineUser

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-01-18 11:32:04 +01:00
Arthur Schiwon
1d1d5e1e7c fix(LDAP): ensure stored groups are formatted as simple list
With array_unique it is possible that the keys are not in sequential order
but have gaps. json_encode then would store them as associative array,
which later on json_decode would result in a stdClass by default. This is
unexpected and would also contradict the return type hint.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2024-01-02 12:15:50 +01:00
Arthur Schiwon
c8f1141ef1
Merge pull request #40921 from nextcloud/backport/40709/stable26
[stable26] LDAP: Increase profile picture limit to 512
2023-11-15 21:35:16 +01:00
Arthur Schiwon
cd1b960f3a fix(LDAP): prevent incomplete displaynames…
… when reading users from primary groups or gidNumber-based groups

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-11-09 20:01:26 +00:00
Arthur Schiwon
873222f0c1 fix(LDAP): solve race condition reading groups of disappeared LDAP user
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-11-07 19:22:28 +01:00
Arthur Schiwon
f89781366b refactor(LDAP): pass IConfig via constructor to Group_LDAP
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-11-07 19:22:28 +01:00
Arthur Schiwon
467e29ec03 fix(ldap): store last known user groups
- for LDAP user life cycle management

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-11-07 19:22:28 +01:00
Marcel Klehr
de296a467f Update apps/user_ldap/lib/User/User.php
Co-authored-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-10-14 21:16:36 +00:00
Marcel Klehr
bd85053bf3 LDAP: Increase profile picture limit to 512
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
2023-10-14 21:16:36 +00:00
Côme Chilliet
e04cb81710 Merge pull request #37201 from AaronDewes/fix/ldap-filter-generation
Fix: Escape group names for LDAP
2023-10-02 11:09:17 +02:00
Arthur Schiwon
68a85c94b7 fix(LDAP): add return type hint and description
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-09-11 18:04:00 +00:00
Arthur Schiwon
2c3badc32a fix(ldap): avatar is not being fetched
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2023-09-11 18:04:00 +00:00
Anna Larch
91e081b064 Do not log passwords in debug mode
Signed-off-by: Anna Larch <anna@nextcloud.com>
2023-08-28 14:35:04 +02:00
Arthur Schiwon
0c3439e151
Merge pull request #37304 from nextcloud/backport/37006/stable26
[stable26] also unmark deleted ldap user when checking the ldap entry
2023-05-17 13:36:46 +02:00
Côme Chilliet
77f1ba9225 Add comment about Manager instance not being shared
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-02 15:56:35 +00:00
Côme Chilliet
c7accb30c1 Fix multiple LDAP configuration support by fixing AccessFactory
It must not reuse the same OCA\User_LDAP\User\Manager instance for
 several Access instances.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-02 15:56:34 +00:00
Robin Appelman
8d9ec16eaf also unmark deleted ldap user when checking the ldap entry
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-03-20 15:27:22 +00:00
Côme Chilliet
d62643b43e Do not send a pagination control with size = 0 if cookie is empty
It only makes sense to send a pagination control with size 0 with a
 cookie to abandon a paged search.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-03-15 13:47:21 +00:00
Côme Chilliet
3c0b1bdc30
Remove redundant cast to string in user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:11:13 +01:00
Côme Chilliet
a372564850
Fix psalm spotted errors with new requirements
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-02 15:02:28 +01:00
Vincent Petry
13d5426893
Merge pull request #35839 from nextcloud/feat/user_ldap-longer-ttl-for-fallback
Apply a longer TTL of 15min to falling back on backup server
2022-12-20 17:19:56 +01:00
Côme Chilliet
f6ff717b56
Merge pull request #34772 from nextcloud/fix/clean-ldap-access-factory-usage
Make sure to use AccessFactory to create Access instances and use DI
2022-12-20 16:48:07 +01:00
Côme Chilliet
1ac2c74830
Apply a longer TTL of 15min to falling back on backup server
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-20 12:01:25 +01:00
Côme Chilliet
6b7ffcd6a8
Fixed backup host logic
Now forcing backup host applies to both main and background.
And background will fallback to backup if not responding.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 14:15:48 +01:00
Côme Chilliet
406750552e
Make code clearer for background host
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 14:15:48 +01:00
Côme Chilliet
4758bdc476
Use a dedicated LDAP host and port for background jobs if configured
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 14:15:46 +01:00
Côme Chilliet
75e369d306
Merge pull request #35231 from nextcloud/fix/user_ldap-cache-fetched-list-of-groups
Cache the fetched list of groups
2022-12-19 12:34:05 +01:00
Côme Chilliet
f7cd7047a2
Merge pull request #24574 from zenlord/ldapi-unix-socket-support
Ldapi unix socket support
2022-12-08 17:25:00 +01:00
Côme Chilliet
a0f6a6545b
Use TimedJob from OCP instead of OC
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-05 10:13:34 +01:00
blizzz
b16c9838c6
Merge pull request #35355 from nextcloud/artonge/feat/ldap_connection_timeout
Allow to set a custom timeout for ldap connections
2022-11-30 14:44:15 +01:00
Côme Chilliet
e00740ea38
Merge pull request #35230 from nextcloud/fix/user_ldap-log-backup-switch
Log switching to LDAP backup host because main one is not available
2022-11-24 18:20:36 +01:00
Louis Chemineau
a781ae3afb Allow to set a custom timeout for ldap connections
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-11-23 11:37:49 +01:00
Côme Chilliet
90165309e1
Improve a bit codestyle
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-22 16:57:24 +01:00
Côme Chilliet
911967867f
Merge branch 'master' into ldapi-unix-socket-support
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2022-11-22 16:47:42 +01:00
Côme Chilliet
341dda1de6
Merge branch 'master' into fix/clean-ldap-access-factory-usage
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2022-11-21 16:05:17 +01:00
Côme Chilliet
4893501abe
Log as warning instead of info when main LDAP server is unreachable
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-21 10:31:24 +01:00
Côme Chilliet
9e1dd52c99
Cache the fetched list of groups
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-17 15:12:24 +01:00
Côme Chilliet
3e15ea6cd0
Log switching to LDAP backup host because main one is not available
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-17 14:58:44 +01:00
Côme Chilliet
1d00290621
Cache display name even if it was not filled
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-17 14:47:00 +01:00
Arthur Schiwon
e6e18b4008
[LDAP] always create instance of own user manager
- it is config specific and cannot be shared
- because the Access instance is bound later, it is not obvious from the
  constructor

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-11-10 10:32:01 +01:00
Vincent Petry
a736a2b03b
Merge pull request #34702 from nextcloud/fix/clean-ldap-wizard-typing
Clean up LDAP Wizard typing
2022-11-04 17:29:30 +01:00
Carl Schwan
4344a54a1d
Merge pull request #34691 from nextcloud/profiler/ldap-backtrace
Add backtrace to ldap profiler collector
2022-10-25 17:00:23 +02:00
Côme Chilliet
556e3c84e6
Fix return type for countUsers method
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-25 10:20:09 +02:00
Côme Chilliet
5242a78994
Fix $host var handling to avoid passing null to ldap_connect
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-25 09:59:56 +02:00
Côme Chilliet
4130a4cbd8
Make sure to use AccessFactory to create Access instances and use DI
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-25 09:52:35 +02:00
Côme Chilliet
142f9913a6
Expose mapped user count from LDAP and use that for user limit check
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-24 16:54:41 +02:00
Simon L
47da08fe85
Merge pull request #33945 from nextcloud/fix/noid/fair-use-ldap
LDAP to not register new users when outside of fair use or over limits
2022-10-21 18:53:16 +02:00
Carl Schwan
25519b7089 Add backtrace to ldap profiler collector
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-10-20 16:55:44 +02:00
Côme Chilliet
3dedfd34b9
Clean up LDAP Wizard typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-20 16:51:39 +02:00