Commit graph

3061 commits

Author SHA1 Message Date
Louis
955cb63e41
Merge pull request #30343 from nextcloud/backport/29329/stable23
[stable23] fix potential unwarranted memberships in nested groups from LDAP
2021-12-30 11:04:39 +01:00
Arthur Schiwon
bf81fa432a fix potential unwarranted memberships in nested groups from LDAP
- the issue was present only when using PHP based resolving of nested
  group members. Normally nested members are common in AD (and Samba4) and
  are resolved per LDAP_MATCHING_RULE_IN_CHAIN by default
- resolving nested members is recursive
- when the cache entry was created it happend for intermediate groups, too,
  containing members from the parent group
- the check was added to only cache the root group with its members
- a runtime cache stores intermediate ldap read results


Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-12-20 09:18:59 +00:00
Côme Chilliet
4010e58a96 [stable23] Avoid use of iconv to get rid of unicode
Using iconv for translit depends upon server configuration, locale, and
 PHP version. Using htmlentities instead to have a consistent behavior
 independent of configuration.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Co-authored-by: MichaIng <micha@dietpi.com>
2021-12-20 03:00:37 +01:00
Côme Chilliet
6b107026dd
Bump user_ldap version to make sure the migration runs
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:51:44 +01:00
Côme Chilliet
b5b080a219
Add missing copyright headers in migration steps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:40:38 +01:00
Côme Chilliet
e7a769158d
Use clearer names for variables
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:40:15 +01:00
Côme Chilliet
9e33d51c44
Add an index for directory_uuid as well
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:40:08 +01:00
Côme Chilliet
fbed00bab4
Make sure that hash function returns a string
The documentation says it can return false, and even if that is highly
 unlikely for sha256, better safe than sorry.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:39:55 +01:00
Côme Chilliet
98476a9d5d
Add the columns and alter the index in Version1010Date20200630192842
This is to ensure new installations do not need to go through migration
 history.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:39:45 +01:00
Côme Chilliet
2336a188df
Fixes in migration step
We cannot set ldap_dn_hash column as notnull because it is empty for
 existing users before postSchemaChange is called

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:39:33 +01:00
Côme Chilliet
a0db2a248c
Put back length check to have a clear error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:39:23 +01:00
Côme Chilliet
189852b549
Fixed migration step for user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:39:12 +01:00
Joas Schilling
54007f9993
Fix variable names
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-13 09:39:04 +01:00
Côme Chilliet
514b34084a
Change column names to ldap_dn and ldap_dn_hash and add migration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:38:54 +01:00
Côme Chilliet
fe3203a66e
Support LDAP dns longer than 255 characters
Adds an ldap_full_dn column to store the dn, and only store a sha256
 hash in the ldap_dn which is shorter and can be indexed without
 trouble.
Migration still needs to be implemented.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-13 09:38:43 +01:00
Joas Schilling
5e8fa37852 Allow to log DB, redis and LDAP requests into files
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-02 09:30:44 +00:00
Côme Chilliet
2b58973533 Test cache invalidation for AbstractMapping in test suite
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-26 14:19:14 +01:00
Côme Chilliet
e983376e58 Make sure mapping cache is cleared when deleting a user
This avoids phantom remnants staying after user deletion

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-26 14:19:14 +01:00
Carl Schwan
dacf2e47a3
Update to composer 2.1.11
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-11-04 12:30:11 +01:00
Nextcloud bot
b691f30af1
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-10-26 02:22:53 +00:00
Nextcloud bot
7c2d8d3e82
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-10-23 02:22:31 +00:00
Carl Schwan
a67a12cb96
Merge pull request #29240 from nextcloud/work/admin-delegation-implementation
Add support for Delegation Settings for more apps
2021-10-15 20:59:43 +02:00
Carl Schwan
719dbafd13
Add support for Delegation Settings for more apps
* This adds support for the sharing, groupware, theming and user_ldap
  app
* This adds some code who disapeared during a rebase in the initial
  delegation PR (provisioning_api)

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2021-10-15 18:41:00 +02:00
John Molakvoæ
f7a4ff4d63
Merge pull request #27217 from nextcloud/techdebt/noid/make-debugging-a-cron-job-easier 2021-10-15 11:09:23 +02:00
Côme Chilliet
f9e6f2ea57
Use Psr\Log\LoggerInterface where it can easily be used in user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-14 14:12:03 +02:00
Joas Schilling
3adc997833
Bump autoloader
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-14 09:58:49 +02:00
Côme Chilliet
d189a23f43
Fix two mistakes in previous migration to LoggerInterface in OCA\User_LDAP\Access
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-14 09:24:49 +02:00
Côme Chilliet
51398d706a
Use Psr\Log\LoggerInterface in OCA\User_LDAP\Access
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-12 17:19:51 +02:00
Côme Chilliet
437048e9b6
Avoid PHP errors when the LDAP attribute is not found
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-12 12:44:26 +02:00
Vincent Petry
5a6a0b0d3b
Update app versions for 23
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-09-28 12:21:40 +02:00
blizzz
e8f76b03bb
Merge pull request #28876 from nextcloud/fix/28653/ldap-long-user-group-ids
ensure that user and group IDs in LDAP's tables are also max 64chars
2021-09-24 22:53:06 +02:00
Arthur Schiwon
6ab30a669b
ensure that user and group IDs in LDAP's tables are also max 64chars
- limitation by core tables (e.g. sharing), IDs are always 64chars
- when longer group IDs were requested they are hashed (does not affect
  displaynames)

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-24 17:29:29 +02:00
Vincent Petry
ea20454a2b
Merge pull request #28916 from nextcloud/fix/noid/objectsid
fix caching of objectsid searches
2021-09-24 17:04:12 +02:00
Christoph Wurst
a2bc7e2eec Update generated composer files to latest format
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-09-22 11:37:04 +02:00
Arthur Schiwon
7178194198
fix caching of objectsid searches
- store result when no name could be retrieved, too
- cached value is not an array, was treated wrongly

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-21 13:32:42 +02:00
Nextcloud bot
208a7b688d
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-09-15 02:27:54 +00:00
Nextcloud bot
58891a9655
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-09-14 02:30:41 +00:00
Arthur Schiwon
27865d03c0
use specific email getter where necessary
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-09-09 19:23:05 +02:00
John Molakvoæ
d24929b98a
Merge pull request #28420 from nextcloud/fix/composer-2-missing-files
Add missing files for Composer v2
2021-08-15 10:25:46 +02:00
Nextcloud bot
b61bb729c2
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-08-14 02:26:43 +00:00
Christoph Wurst
6a50c4a344
Add missing files for Composer v2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-08-13 15:01:02 +02:00
Nextcloud bot
a716c35888
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-08-10 02:31:43 +00:00
Nextcloud bot
27847a9250
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-08-08 02:21:43 +00:00
Nextcloud bot
de68aecb05
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-08-06 02:26:56 +00:00
Nextcloud bot
276b8f2315
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-08-02 07:35:19 +00:00
Nextcloud bot
7f572c0645
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-07-15 10:37:23 +00:00
Nextcloud bot
bdb5d9f418
[tx-robot] updated from transifex 2021-07-10 02:31:32 +00:00
Nextcloud bot
726f23ffd9
[tx-robot] updated from transifex 2021-07-08 02:26:46 +00:00
Nextcloud bot
4aefd04f40
[tx-robot] updated from transifex 2021-07-04 02:25:36 +00:00
Julius Härtl
3853307a6a
Merge pull request #26681 from nextcloud/techdebt/hint-exception-ocp
Move HintException to OCP
2021-07-01 08:34:55 +02:00