Commit graph

3077 commits

Author SHA1 Message Date
Nextcloud bot
93d5299b49
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-25 02:27:37 +00:00
Nextcloud bot
0e57419a4d
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-24 02:26:57 +00:00
blizzz
d5406e8f1a
Merge pull request #31307 from nextcloud/backport/31299/stable22
[stable22] Ignore cache in occ ldap:check-ldap command
2022-02-22 18:46:58 +01:00
Nextcloud bot
400c0bf304
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-22 02:29:35 +00:00
Côme Chilliet
e502220693 Check LDAP upon user deletion instead of refusing based on cached information
This should avoid having to wait for background job to run after
 deleting a user in LDAP before being able to delete it in Nextcloud.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-21 15:48:07 +00:00
Côme Chilliet
6201d4c157 Ignore cache in occ ldap:check-ldap command
This avoids having to wait or reset the cache after deleting a user in
 the LDAP.
This also fixes a PHP error when running ldap:check-ldap --update on a
 deleted but cached user.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-21 15:48:07 +00:00
Nextcloud bot
ac6a011557
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-13 02:27:09 +00:00
Côme Chilliet
a1d6678c25 Fix psalm errors in apps/user_ldap/lib/Jobs/CleanUp.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-10 18:48:33 +00:00
Côme Chilliet
ef11c61f19 Fix ldap:update-uuid
Generators cannot be iterated with while or returned by an other
 generator, using foreach instead.
And a few other problems.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-10 18:48:33 +00:00
Arthur Schiwon
91578d0e5a add occ command to update UUIDs (incomplete)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-10 18:48:33 +00:00
Arthur Schiwon
0931853023 allow to re-run migration step when backup DB is already created
- to heal incomplete states from broken upgrades

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-10 18:48:33 +00:00
Arthur Schiwon
ac68b0662a invalidated duplicated UUIDs prior to migration change
- in a proper setup there are no duplicated UUIDs
- not all setups are proper
- log warning to admin

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-10 18:48:32 +00:00
Nextcloud bot
4ea9050328
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-02 02:27:21 +00:00
Carl Schwan
57514e44a9
Psalm fixing
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-27 17:20:48 +01:00
Nextcloud bot
7acd13d002
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-22 02:26:44 +00:00
John Molakvoæ
b6415ad8bf
Revert "[stable22] Hash job argument" 2022-01-20 21:10:43 +01:00
Julius Härtl
5bda5e5d95
Add hashed attribute column for indexed job existence check
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-01-18 15:13:11 +01:00
Côme Chilliet
089377bd0d Remove useless indexes with duplicated names on backup table
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:40:56 +00:00
Joas Schilling
8d107d9ce1 Update autoloader
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-14 08:40:55 +00:00
Côme Chilliet
488e17cd44 Fix user_ldap migration for long DNs support
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:40:54 +00:00
Côme Chilliet
9a13fb0b0e Move duplicated code to a base class for group_mapping migrations
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Co-authored-by: Joas Schilling <213943+nickvergessen@users.noreply.github.com>
2022-01-14 08:40:54 +00:00
Côme Chilliet
3d3bbf92aa Split dropTable and createTable in two migrations
It is not possible to drop and create the same table in one migration

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:40:53 +00:00
Côme Chilliet
58cd5eb2e1 Fix primary key change in user_ldap migration
Use a backup table to copy the data, drop table and recreate it with
 correct primary key, then copy the data back and drop the backup table.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:40:52 +00:00
Nextcloud bot
bf234ca442
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-13 02:26:46 +00:00
Nextcloud bot
575b297891
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-07 02:28:15 +00:00
Nextcloud bot
a0c60cf6a3
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-03 02:27:49 +00:00
Louis
7f82061ab9
Merge pull request #30340 from nextcloud/backport/29329/stable22
[stable22] fix potential unwarranted memberships in nested groups from LDAP
2021-12-30 11:03:03 +01:00
Nextcloud bot
21a1ee161f
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-27 02:27:29 +00:00
Côme Chilliet
c891fffde8 [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 09:57:43 +00:00
Arthur Schiwon
ad0ea2ccb0 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:10:49 +00:00
Côme Chilliet
eeefca2658
Bump user_ldap version to make sure the migration runs
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:05:36 +01:00
Côme Chilliet
1523482047
Add missing copyright headers in migration steps
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:05:36 +01:00
Côme Chilliet
30507846bc
Use clearer names for variables
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:05:36 +01:00
Côme Chilliet
ddb9727be1
Add an index for directory_uuid as well
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:05:35 +01:00
Côme Chilliet
bab9964c01
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-16 09:05:35 +01:00
Côme Chilliet
bae8799e80
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-16 09:05:35 +01:00
Côme Chilliet
aa65a4fe90
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-16 09:05:34 +01:00
Côme Chilliet
581b1d8da6
Put back length check to have a clear error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:05:34 +01:00
Côme Chilliet
343989aa52
Fixed migration step for user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-16 09:05:33 +01:00
Joas Schilling
3ba2afbcdf
Fix variable names
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-16 09:05:33 +01:00
Côme Chilliet
072897cdf8
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-16 09:05:33 +01:00
Côme Chilliet
0843dda1bd
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-16 09:05:16 +01:00
Nextcloud bot
fcea22c1d5
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-16 02:27:59 +00:00
Nextcloud bot
080a550621
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-08 02:28:53 +00:00
Nextcloud bot
1fc126ece7
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-27 02:26:09 +00:00
MichaIng
b726e05a63
Merge pull request #29850 from nextcloud/backport/29836/stable22
[stable22] Make sure mapping cache is cleared when deleting a user
2021-11-25 17:15:27 +01:00
Nextcloud bot
6759ee5caf
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-24 02:26:06 +00:00
Côme Chilliet
d895cd9eaf Test cache invalidation for AbstractMapping in test suite
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-11-23 10:23:10 +00:00
Côme Chilliet
5b2764a2aa 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-23 10:23:10 +00:00
Nextcloud bot
ab83f3ab0f
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-19 02:38:28 +00:00