Arthur Schiwon
33ac5fc640
do not forget DB table prefix with truncate query
...
- as used in LDAP's AbstractMapping::clear() method
- and in Comment's ManagerTest::setUp()
- fixes a DB Exception with Oracle
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-05-19 15:09:39 +02:00
Arthur Schiwon
3c91048ad4
be conservative when reading from fresh created column
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-03-21 14:04:20 +01:00
Nextcloud bot
3979ff5917
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-22 02:29:49 +00:00
Arthur Schiwon
a5228a0c42
adjust backport to stable20
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:26 +01:00
Arthur Schiwon
2208ed6f67
fix code style
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:25 +01:00
Arthur Schiwon
c14dda9b44
fix use of executeQuery and -Statement
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:25 +01:00
Côme Chilliet
3188f5dc76
Fix psalm errors in apps/user_ldap/lib/Jobs/CleanUp.php
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-15 13:23:25 +01:00
Côme Chilliet
9c7b769cb2
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-15 13:23:25 +01:00
Arthur Schiwon
66a9b77b37
add occ command to update UUIDs (incomplete)
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-02-15 13:23:25 +01:00
Arthur Schiwon
bf31badac4
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-15 13:23:24 +01:00
Arthur Schiwon
6813b38148
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-15 13:23:24 +01:00
Nextcloud bot
756352046e
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-13 02:27:25 +00:00
Nextcloud bot
6be2b224f4
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-02-02 02:27:37 +00:00
Nextcloud bot
5356d221e4
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-22 02:27:03 +00:00
Côme Chilliet
d6b0ff4163
Functions executeQuery and executeStatement do not exists in 20
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-17 12:00:02 +01:00
Côme Chilliet
02e78231f9
Fix Types namespace for version 20
...
Use Doctrine\DBAL\Types\Types instead of OCP\DB\Types
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-17 10:34:52 +01:00
Côme Chilliet
e20548731f
Remove useless indexes with duplicated names on backup table
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:46:46 +00:00
Joas Schilling
56644bb15e
Update autoloader
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-14 08:46:45 +00:00
Côme Chilliet
f2204af7b2
Fix user_ldap migration for long DNs support
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-01-14 08:46:44 +00:00
Côme Chilliet
85f5fe6dda
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:46:44 +00:00
Côme Chilliet
d6d5f3d2f3
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:46:43 +00:00
Côme Chilliet
4b40402821
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:46:42 +00:00
Nextcloud bot
b756fdbb78
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-13 02:27:01 +00:00
Nextcloud bot
25678996b2
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-07 02:28:30 +00:00
Côme Chilliet
84c4f8530b
Merge pull request #30269 from nextcloud/backport/29523/stable20
...
[stable20] Support LDAP dns longer than 255 characters
2022-01-06 11:28:18 +01:00
Nextcloud bot
ec5ace6795
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-01-03 02:28:09 +00:00
Arthur Schiwon
55a27ead50
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-30 10:25:14 +00:00
Nextcloud bot
31b02ef9d8
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-27 02:27:41 +00:00
Nextcloud bot
334e9f0519
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-16 02:28:15 +00:00
Côme Chilliet
5a2b7fbc46
Adapt execute function name for stable21
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:51:53 +01:00
Côme Chilliet
2b1bb599f1
Bump user_ldap version to make sure the migration runs
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:51:42 +01:00
Côme Chilliet
e2d861313f
Add missing copyright headers in migration steps
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:51:01 +01:00
Côme Chilliet
e3d541bf32
Use clearer names for variables
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:55 +01:00
Côme Chilliet
a51e366b0a
Add an index for directory_uuid as well
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:49 +01:00
Côme Chilliet
2a726a33e8
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-14 16:50:42 +01:00
Côme Chilliet
2aa748b782
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-14 16:50:35 +01:00
Côme Chilliet
0680271155
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-14 16:50:23 +01:00
Côme Chilliet
c22c7fa7a4
Put back length check to have a clear error
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:17 +01:00
Côme Chilliet
e5c8ea4f5d
Fixed migration step for user_ldap
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-12-14 16:50:09 +01:00
Joas Schilling
462b421cdb
Fix variable names
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-12-14 16:50:02 +01:00
Côme Chilliet
2ca7f31cbf
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-14 16:49:55 +01:00
Côme Chilliet
3d8d4f8c1b
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-14 16:49:31 +01:00
Nextcloud bot
e020446835
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-12-08 02:29:14 +00:00
Nextcloud bot
d1e21c0b00
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-27 02:26:28 +00:00
Nextcloud bot
934f04d4d8
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-24 02:26:25 +00:00
Nextcloud bot
4ebc733b70
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-19 02:38:47 +00:00
Nextcloud bot
71d6316e2e
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-14 02:26:10 +00:00
Nextcloud bot
6909cfab99
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-13 02:26:18 +00:00
Nextcloud bot
77a2c06a26
[tx-robot] updated from transifex
...
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2021-11-12 02:23:24 +00:00
Côme Chilliet
349f4f6263
Fix Access constructor call
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2021-10-29 09:03:12 +00:00