Côme Chilliet
a372564850
Fix psalm spotted errors with new requirements
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 рік тому
Carl Schwan
1b12a08ec2
Fix user_ldap tests
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 рік тому
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>
1 рік тому
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>
1 рік тому
Côme Chilliet
6c7ba01dfe
Adapt max length limit in AbstactMapping to match database
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 роки тому
Côme Chilliet
ccab35f23f
Fix similar potential problems with fetchOne loops
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 роки тому
Côme Chilliet
fb63484ced
Improve typing in user_ldap to detect problems early
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 роки тому
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>
2 роки тому
Arthur Schiwon
45d4c0bf66
add occ command to update UUIDs (incomplete)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2 роки тому
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>
2 роки тому
Côme Chilliet
d4c49a3a60
Put back length check to have a clear error
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 роки тому
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>
2 роки тому
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>
2 роки тому
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>
2 роки тому
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 роки тому
Arthur Schiwon
21ca5d4514
silence psalm false positive
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
3 роки тому
Arthur Schiwon
45e3261ad5
respect DB limits limit per statement and query
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
3 роки тому
Christoph Wurst
8b64e92b92
Bump doctrine/dbal from 2.12.0 to 3.0.0
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 роки тому
Roeland Jago Douma
dc89447f13
Revert "(LDAP) respect DB limits of arguments in an IN statement"
3 роки тому
Arthur Schiwon
6eca8d6ae1
respect DB limits of arguments in a IN list
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
3 роки тому
Christoph Wurst
2a054e6c04
Update the license headers for Nextcloud 20
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 роки тому
blizzz
0ab6ee40de
be more clear about the condition
Co-authored-by: Christoph Wurst <ChristophWurst@users.noreply.github.com>
4 роки тому
Arthur Schiwon
0cf57d1ed4
getXbyY can still return false, e.g. when using ldap write support
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
4 роки тому
Christoph Wurst
cb057829f7
Update license headers for 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Arthur Schiwon
4babdc082b
formatting
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
4 роки тому
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>
4 роки тому
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>
4 роки тому
Christoph Wurst
36b3bc8148
Use php keywords in lowercase
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
85e369cddb
Fix multiline comments
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Joas Schilling
bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 роки тому
Morris Jobke
b458ed9c82
Properly escape column name in "createFunction" call
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 роки тому
Arthur Schiwon
8fe914f07e
LDAP backend to emit announce and revoke signals on mapping changes
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 роки тому
Arthur Schiwon
59c05d5447
move LDAP user attributes "sync" to background (except for ajax jobs)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
6 роки тому
Arthur Schiwon
497ee3e3e6
Add repair steps
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 роки тому
Arthur Schiwon
03ae7b654f
Gracefully deny users or groups with too long DNs
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
7 роки тому
Joas Schilling
813f0a0f40
Fix apps/
8 роки тому
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
8 роки тому
Lukas Reschke
aba539703c
Update license headers
8 роки тому
Joas Schilling
9d61acb27d
Move User_LDAP to PSR-4
8 роки тому