Côme Chilliet
a372564850
Fix psalm spotted errors with new requirements
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 1 gada
Carl Schwan
1b12a08ec2
Fix user_ldap tests
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pirms 1 gada
Arthur Schiwon
50d4963772
[LDAP] throw exception only against prov api
- unbreaks functionality for end users when on demand mapping takes
place
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 1 gada
Arthur Schiwon
8e8acf2d90
LDAP to no register new users when outside of fair use or over limits
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 1 gada
Côme Chilliet
6c7ba01dfe
Adapt max length limit in AbstactMapping to match database
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 2 gadiem
Côme Chilliet
ccab35f23f
Fix similar potential problems with fetchOne loops
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 2 gadiem
Côme Chilliet
fb63484ced
Improve typing in user_ldap to detect problems early
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 2 gadiem
Côme Chilliet
9f2db6e65d
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>
pirms 2 gadiem
Arthur Schiwon
45d4c0bf66
add occ command to update UUIDs (incomplete)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 2 gadiem
Côme Chilliet
df25a6de31
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>
pirms 2 gadiem
Côme Chilliet
d4c49a3a60
Put back length check to have a clear error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 2 gadiem
Côme Chilliet
31a503b387
Change column names to ldap_dn and ldap_dn_hash and add migration
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pirms 2 gadiem
Côme Chilliet
662e3240b0
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>
pirms 2 gadiem
Côme Chilliet
51ea7dc020
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>
pirms 2 gadiem
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pirms 3 gadiem
Arthur Schiwon
21ca5d4514
silence psalm false positive
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 3 gadiem
Arthur Schiwon
45e3261ad5
respect DB limits limit per statement and query
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 3 gadiem
Christoph Wurst
8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 3 gadiem
Roeland Jago Douma
dc89447f13
Revert "(LDAP) respect DB limits of arguments in an IN statement"
pirms 3 gadiem
Arthur Schiwon
6eca8d6ae1
respect DB limits of arguments in a IN list
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 3 gadiem
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 3 gadiem
blizzz
0ab6ee40de
be more clear about the condition
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com>
pirms 4 gadiem
Arthur Schiwon
0cf57d1ed4
getXbyY can still return false, e.g. when using ldap write support
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 4 gadiem
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 4 gadiem
Arthur Schiwon
4babdc082b
formatting
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 4 gadiem
Arthur Schiwon
32000dd1af
read records from DB for lists at once, not one by one.
Keep a runtime cache of dn-id-mapping
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 4 gadiem
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.
This also removes and empty lines from method/function bodies at the
beginning and end.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 4 gadiem
Christoph Wurst
36b3bc8148
Use php keywords in lowercase
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 4 gadiem
Christoph Wurst
85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 4 gadiem
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 4 gadiem
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 4 gadiem
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
pirms 4 gadiem
Joas Schilling
bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
pirms 5 gadiem
Morris Jobke
b458ed9c82
Properly escape column name in "createFunction" call
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
pirms 5 gadiem
Arthur Schiwon
8fe914f07e
LDAP backend to emit announce and revoke signals on mapping changes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 6 gadiem
Arthur Schiwon
59c05d5447
move LDAP user attributes "sync" to background (except for ajax jobs)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 6 gadiem
Arthur Schiwon
497ee3e3e6
Add repair steps
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 7 gadiem
Arthur Schiwon
03ae7b654f
Gracefully deny users or groups with too long DNs
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
pirms 7 gadiem
Joas Schilling
813f0a0f40
Fix apps/
pirms 8 gadiem
Aaron Wood
7c0de08cc4
Escape special characters (#25429)
* Escape LIKE parameter
* Escape LIKE parameter
* Escape LIKE parameter
* Escape LIKE parameter
* Escape LIKE parameter
* Use correct method in the AbstractMapping class
* Change the getNamesBySearch method so that input can be properly escaped while still supporting matches
* Don't escape hardcoded wildcard
pirms 8 gadiem
Lukas Reschke
aba539703c
Update license headers
pirms 8 gadiem
Joas Schilling
9d61acb27d
Move User_LDAP to PSR-4
pirms 8 gadiem