Commit graph

20874 commits

Author SHA1 Message Date
Andriy Utkin
807c53b2ab Make config file saving safe against write failures
In case of disk space depletion, writing a new version of config fails,
leaving the config file empty.

This patch improves safety of updates to config.php by saving the new
version of the config into a randomly-named temporary file in the same
directory, and then renaming it to config.php, which renaming is atomic
in POSIX-compliant filesystems and shouldn't involve disk space
allocation. If writing the new config version is impossible, the current
config remains unchanged.

This patch drops the use of file locking as unnecessary. File locking
merely established order in which the concurrent independent processes
attempted file writing. In the end, the process which was last to update
the file "wins" - their changes persist and the changes of previous
writers are dropped as there's no conflict detection or change merging
mechanism anyway. With the current change, there is still some resulting
ordering, and the last writer still wins in the same way. Readers don't
need file locking as well, as opening config.php for reading always
provides a certain consistent version of the file.

Signed-off-by: Andriy Utkin <dev@autkin.net>
2022-09-09 21:46:12 +01:00
Carl Schwan
bc9a488046
Update avatars on update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-09 14:23:41 +02:00
Carl Schwan
76d0165330
Dark theme for guest avatar
And better caching policy

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-09 13:37:51 +02:00
Carl Schwan
f98ae2b5b0
Avatar new style
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-09 13:37:51 +02:00
Nextcloud bot
f8796b86d1
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-09 02:26:29 +00:00
Carl Schwan
eac54c4660
Merge pull request #33788 from nextcloud/improve-recent
Improve getting recent files performance
2022-09-08 16:19:41 +02:00
blizzz
c77cc80fcc
Merge pull request #33906 from nextcloud/fix/fix-calendar-tests-getTimestamp
Fix Calendar tests mocking a non-existant method.
2022-09-08 12:42:03 +02:00
Nextcloud bot
107aeb36e5
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-08 02:26:07 +00:00
Anna Larch
f7d73b0fc1 Fix various errors in iMIP logic
Signed-off-by: Anna Larch <anna@nextcloud.com>
2022-09-08 02:26:10 +02:00
blizzz
417f46e467
Merge pull request #33600 from nextcloud/lazy-quota
get quota for user only when needed
2022-09-07 18:10:33 +02:00
Nextcloud bot
2d709e45c0
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-07 02:25:42 +00:00
Louis
1f967175f3
Merge pull request #33813 from nextcloud/fix/infinite_email_change_notification
Compare lowercase email when updating from ldap
2022-09-06 17:10:08 +02:00
Carl Schwan
ff49fa4415
Merge pull request #29881 from nextcloud/fix/setting/accessibility-title
Improve accessibility of the title of the settings
2022-09-06 16:56:14 +02: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 +00:00
Nextcloud bot
405edfa90c
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-06 02:25:04 +00:00
Daniel
8de2c4213f
Merge pull request #33889 from nextcloud/debt/noid/docblock-cache-for
Update docblock for cacheFor
2022-09-05 17:21:26 +02:00
Carl Schwan
67551f379f
Filter out old files when trying to get recent files
Only do so when asking for less than 100 files and having an offset
equal to 0.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-05 12:53:32 +02:00
Nextcloud bot
f496e471e0
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-05 02:24:50 +00:00
Nextcloud bot
eca05ff456
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-04 02:24:18 +00:00
Daniel
c55ae98a3f
Add description for public and immutable
Co-authored-by: Carl Schwan <carl@carlschwan.eu>
Signed-off-by: Daniel <mail@danielkesselberg.de>
2022-09-03 15:58:18 +02:00
Daniel Kesselberg
855ef21883
Update docblock for cacheFor
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2022-09-03 15:28:23 +02:00
Nextcloud bot
532c7545bd
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-03 02:30:29 +00:00
blizzz
f0b12b450f
Merge pull request #33863 from nextcloud/hash-wrapper-catch-errors
handle errors from hash_final
2022-09-02 22:51:39 +02:00
blizzz
16e696c9e8
Merge pull request #33692 from nextcloud/update-dir
Document and use the new updateDirectory if set
2022-09-02 22:19:50 +02:00
Simon L
6132b6a4ae
Merge pull request #33790 from nextcloud/Valdnet-patch-2
l10n: Spelling unification
2022-09-02 17:01:52 +02:00
Valdnet
d9399e1246 l10n: Spelling unification
Spelling unification in Transifex.

Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>

l10n: Change to administration

Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>

l10n: Spelling unification

Spelling unification in Transifex.
Match the menu name to the header name of the settings page.

Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2022-09-02 12:42:07 +02:00
Robin Appelman
9f5f970957
handle errors from hash_final
Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-02 12:27:13 +02:00
Carl Schwan
2397ea7219
Merge branch 'master' into fix/setting/accessibility-title
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-09-02 12:05:51 +02:00
Julius Härtl
c7e56d944c
Merge pull request #33818 from nextcloud/enh/reference-event
Add event to load scripts for reference rendering
2022-09-02 09:06:23 +02:00
Nextcloud bot
99a22078b3
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-02 02:24:47 +00:00
Julius Härtl
2ddc6c3026
Add event to load scripts for reference rendering
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-09-01 20:10:53 +02:00
Robin Appelman
bd91c56539
get quota for user only when needed
always apply the wrapper but have the wrapper get the quota lazily only when an operation where quota is applied is performed

Signed-off-by: Robin Appelman <robin@icewind.nl>
2022-09-01 19:32:24 +02: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 +02: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 +02:00
Vincent Petry
3ae439710e
Merge pull request #33764 from nextcloud/cloudid-cache
cache cloud id data in CloudIdManager
2022-09-01 13:27:12 +02:00
Vincent Petry
7ea84277f8
Merge pull request #33774 from nextcloud/hash-wrapper-closed-hash
handle cases where the hash context gets cleaned up before the hash wrapper
2022-09-01 13:23:19 +02:00
Julius Härtl
affa402d21
Merge pull request #33772 from nextcloud/debug/remember-me-login-token-mispatch-session-unavailable 2022-09-01 08:49:56 +02:00
Nextcloud bot
248f5e9395
[tx-robot] updated from transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2022-09-01 02:37:42 +00:00
Maxence Lange
c4bdc1cfbc filter index.php from cloudId
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2022-08-31 18:33:09 -01:00
Julius Härtl
b3eb0bfe05
Merge pull request #33494 from nextcloud/enh/references
Backend for reference metadata fetching
2022-08-31 20:12:34 +02:00
Julius Härtl
1ab66988bc
Inject all dependnencies and increase cache timeout
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 18:02:57 +02:00
Simon L
b0f6ca0e0d
Merge pull request #33756 from nextcloud/enh/noid/admin-settings-directly
add a way to open the admin settings overview directly
2022-08-31 17:56:11 +02:00
Julius Härtl
80f6a5834a
Refactor cache handling
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:24:35 +02:00
Julius Härtl
a392235e23
Cleanup
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:24:33 +02:00
Julius Härtl
bee8fd2408
Limit preview file size
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:07 +02:00
Julius Härtl
68d0038eb0
Move registration to IBootstrap
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +02:00
Julius Härtl
eaef5687f9
Add full public interfaces
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +02:00
Julius Härtl
0ce0d37ac1
Implement image caching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +02:00
Julius Härtl
f58218deea
Add cache invalidation
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +02:00
Julius Härtl
31be855522
Implement reference provider based caching
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:20:06 +02:00