Robin Appelman
ef87ff1848
Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_private
...
Refactor "substr" calls in lib/private to improve code readability
2023-09-21 16:34:27 +07:00
Joas Schilling
943f4c246f
Merge pull request #40079 from nextcloud/techdebt/noid/user-IThrottler-interface-for-DI
...
techdebt(DI): Use public IThrottler interface which exists since 25
2023-08-28 20:46:09 +07:00
Joas Schilling
25309bcb45
techdebt(DI): Use public IThrottler interface which exists since Nextcloud 25
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-28 15:50:45 +07:00
Joas Schilling
daac5c9a95
fix(cache): Remove displayname cache entry on delete
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-08-28 14:59:54 +07:00
Joas Schilling
3962cd0aa8
fix!: Move getEventDispatcher usage to IEventDispatcher
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-28 14:11:22 +07:00
Joas Schilling
ad12a740cb
fix!: Remove symfony EventDispatcherInterface from User
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 23:13:37 +07:00
Joas Schilling
35c313e280
fix!: Remove User events which have a typed event replacement
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-07-27 09:57:54 +07:00
Hamid Dehnavi
d0b20534b9
Refactor "substr" calls to improve code readability
...
Signed-off-by: Hamid Dehnavi <hamid.dev.pro@gmail.com>
2023-07-07 04:54:20 +07:00
Christoph Wurst
14719110b9
chore: Replace \OC::$server->query with \OCP\Server::get in /lib
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-07-06 15:21:22 +07:00
Côme Chilliet
b2f01b72fe
Merge pull request #34443 from nextcloud/feat/add-enabled-user-backend
...
Add IProvideEnabledStateBackend interface
2023-07-03 10:19:32 +07:00
Côme Chilliet
1603cdc8d2
Fix since annotations and add boolean return type for setUserEnabled
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-06-20 15:10:39 +07:00
Robin Appelman
9f1d497a0b
Merge pull request #38261 from fsamapoor/replace_strpos_calls_in_lib_private
...
Refactors "strpos" calls in lib/private to improve code readability.
2023-06-01 23:10:00 +07:00
Joas Schilling
ef93bb926c
fix(dav): Fix avatar size in system address book
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-05-26 10:03:58 +07:00
Côme Chilliet
285c42ab14
Fix user tests, avoid setting enabled state to the same value
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-23 17:18:19 +07:00
Côme Chilliet
3af1ab2b2a
Add user enabled state backend feature
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-05-23 11:25:03 +07:00
Faraz Samapoor
e7cc7653b8
Refactors "strpos" calls in lib/private to improve code readability.
...
Signed-off-by: Faraz Samapoor <fsamapoor@gmail.com>
2023-05-15 15:17:19 +07:00
Christoph Wurst
1381c4c157
feat(users): Store and load a user's manager
...
Co-Authored-By: hamza221 <hamzamahjoubi221@gmail.com>
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2023-05-12 13:56:48 +07:00
Christopher Ng
4ecae83385
fix(user): Can change display name
...
Signed-off-by: Christopher Ng <chrng8@gmail.com>
2023-05-04 11:14:49 +07:00
Joas Schilling
b91957e3df
fix(dav): Abort requests with 429 instead of waiting
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-05-03 22:43:36 +07:00
Côme Chilliet
346344c153
Update version number in since and deprecated annotations
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 12:04:32 +07:00
Côme Chilliet
3c2b126eba
Make code clearer and bump @ deprecated annotations
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-27 12:00:07 +07:00
Carl Schwan
a4c599c1c9
Split new method in a new group backend interface
...
Better for backward compatibility, also move new interfaces to nc 26
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-04-27 12:00:01 +07:00
Carl Schwan
35dc223500
Optimize retrieving display name when searching for users in a group
...
This is recurrent scenario that we are searching for users and then for
each users we fetch the displayName. This is inefficient, so instead try
to do one query to fetch everything (e.g. Database backend) or use the
already existing DisplayNameCache helper.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2023-04-27 11:57:45 +07:00
Côme Chilliet
426c0341ff
Use typed version of IConfig::getSystemValue as much as possible
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-04-05 12:50:08 +07:00
Julius Härtl
c7c1133c15
Merge pull request #35561 from nextcloud/create-user-transaction
2023-03-15 15:13:50 +07:00
Arthur Schiwon
a30d7c51d3
Merge pull request #37227 from nextcloud/h1-dav-brute-force-protection
...
chore: use local variable for remote address
2023-03-15 15:11:53 +07:00
Thomas Citharel
f7e65b1751
Create the database user in a transaction
...
In OC\User\Manager::createUserFromBackend the newly created user is read
using getUserObject($uid, $backend) but that can cause causal read
issues (wrote in DB primary, not yet in secondary).
In OC\User\Database user backend the user cache is unset after the
insert, so it can't be used by getRealUID() (which is called by
getUserObject()).
To avoid that we make sure the user cache is repopulated in a
transaction.
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2023-03-15 11:07:07 +07:00
Daniel Kesselberg
f751d2d891
chore: use local variable for remote address
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2023-03-10 18:04:34 +07:00
Julius Härtl
3287eddbbc
fix: Recalculate storage statistics on updating the quota
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2023-03-06 22:46:07 +07:00
Robin Appelman
853ec60f3e
also cache backend for user in memory instead of always going to redis
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2023-02-10 12:25:23 +07:00
Côme Chilliet
5aed587e25
Fix setQuota on User on 32bits
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-02-07 11:23:30 +07:00
Côme Chilliet
f5c361cf44
composer run cs:fix
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2023-01-20 11:45:08 +07:00
Simon L
7271ec7acf
spaces are allowed in userids
...
Signed-off-by: Simon L <szaimen@e.mail.de>
2023-01-10 13:25:27 +07:00
Côme Chilliet
f6ff717b56
Merge pull request #34772 from nextcloud/fix/clean-ldap-access-factory-usage
...
Make sure to use AccessFactory to create Access instances and use DI
2022-12-20 16:48:07 +07:00
Joas Schilling
256fbe9d77
Validate if the user part of a "cloud id" can even be a valid user id
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-12-09 22:40:46 +07:00
Roeland Jago Douma
77df92cabf
feat: add event for failed logins
...
Apps might also like to know about failed logins.
This adds that event.
The private interface changes are backwards compatible so all should be fine.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2022-11-24 21:24:21 +07:00
Julius Härtl
de3099b4d6
Remove potential mismatching dav session data during login
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-11-22 08:47:01 +07:00
Côme Chilliet
341dda1de6
Merge branch 'master' into fix/clean-ldap-access-factory-usage
...
Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
2022-11-21 16:05:17 +07:00
Côme Chilliet
c79a6b3f62
Fix errors from PHP 8.2 testing
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-11-14 17:08:21 +07:00
Christoph Wurst
e2d3409a34
Fix unsuccessful token login logged as error
...
The condition of a non-existent login token can happen for concurrent
requests. Admins can not do anything about this. So this is to be
expected to happen occasionally. This event is only bad if none of the
requests is able to re-acquire a session. Luckily this happens rarely.
If a login loop persists an admin can still lower the log level to find
this info. But a default error log level will no longer write those
infos about the failed cookie login of one request.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-07 15:08:48 +07:00
Côme Chilliet
556e3c84e6
Fix return type for countUsers method
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-10-25 10:20:09 +07:00
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>
2022-10-18 12:57:43 +07:00
Joas Schilling
144514e49e
Fix avatar cleanup on user delete
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-09-19 21:36:50 +07:00
Vincent Petry
25888a3d42
Merge pull request #34073 from nextcloud/login-email-filter
...
dont try email login if the provider username is not a valid email
2022-09-16 14:54:24 +07:00
Maxence Lange
381eb046b5
Merge pull request #33793 from nextcloud/fix/noid/rtrim-cloud-id
...
rtrim cloudId url earlier
2022-09-15 10:46:39 +07:00
Robin Appelman
1fbb951691
dont try email login if the provider username is not a valid email
...
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-14 14:04:13 +07:00
Louis Chemineau
6c11944679
I dug into it again, and the issue is much simpler than I previously though.
...
- LDAP has an email address with capital letters
- NC store this address in lower case
- When the user logs in, we compare the [stored email with the new lower case email](https://github.com/nextcloud/server/blob/master/lib/private/AllConfig.php#L259-L261 ) before storing it. Here, both email will be the same, so we won't store the new email address with upper case letters. Which is what we want.
- We then [compare emails as they are before triggering an event](https://github.com/nextcloud/server/blob/master/lib/private/User/User.php#L202-L204 ), they won't match, so the user will receive an email signaling an email change every time he logs in.
The fix is to compare the old email with the new lower case email before sending the event.
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-09-06 13:18:07 +07:00
Vincent Petry
253c0641b1
Merge pull request #33625 from nextcloud/fix/33572/add-user
...
Fix creation of new user and display the correct error message
2022-09-01 17:07:13 +07:00
Maxence Lange
c37bad1ce4
rtrim url earlier
...
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2022-09-01 11:32:14 +07:00
blizzz
2020c15303
Merge pull request #33780 from nextcloud/enh/noid/cloud-id-cli
...
filter index.php from cloudId
2022-09-01 13:35:50 +07:00