Arthur Schiwon [Fri, 29 Oct 2021 16:27:30 +0000 (18:27 +0200)]
add changes from Sebastian/dassIT and move default_realm to backend
- Sebastian added the switch depending on the preg_match result and with it
the fall back to login credentials
- I turned default_realm to a backend option (was previously suggested as
system config key)
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Christopher Ng [Fri, 14 Jan 2022 19:32:10 +0000 (19:32 +0000)]
Improve installation pages
Signed-off-by: Christopher Ng <chrng8@gmail.com>
(cherry picked from commit 22768769c3f29f9952110f86a032e4bf3a4bf460) Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Jonas Meurer [Wed, 12 Jan 2022 14:28:34 +0000 (15:28 +0100)]
updateEncryptedVersion: cleanup on target if cache already got renamed
When moving a file to trash with encryption enabled, the cache gets
moved before the actual file. According to @icewind1991 this is in order
to not break object storage.
When moving a file from an unencrypted storage (e.g. a collectives
storage) to the encrypted trashbin storage, this causes errors, see
This commit fixes it by doing `updateEncryptedVersion()` on the target
cache entry *if* the source cache entry doesn't exist anymore, but the
corresponding target cache entry does exist already.
Fixes: #26544 Signed-off-by: Jonas Meurer <jonas@freesources.org>
Vincent Petry [Wed, 5 Jan 2022 16:19:24 +0000 (17:19 +0100)]
Remove inefficient fed share scanner
Remove scanAll which relies on the "shareinfo" endpoint that returns the
full cache tree.
The latter can become big for big shares and result in timeouts.
Furthermode, the full tree would be retrieved again for each and every
detected change which can become expensive quickly.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Carl Schwan [Fri, 7 Jan 2022 13:00:48 +0000 (14:00 +0100)]
Optimize FileSystemTags workflow for groupfolder
In https://github.com/nextcloud/server/pull/28774 we disabled the
caching for the groupfolder application since it worked due to the fact
that in groupfolders, getFileIds could be called with the same $cacheId
and path for actually different groupfolders.
This revert this change and instead add the folderId from the
groupFolder to the cacheId. This solve the issue of the uniqueness of
the cacheId inside GroupFolder. Downside is that we introduce
groupfolder specific implementation inside the server repo.
The seconf optimization is to not consider paths starting with
__groupfolders in executeCheck. This is due to the fact that files in
the groupfolder application call two times executeCheck one time with
the url __groupfolder/<folderId>/<path> and the other time with <path>.
The first time will always return an empty systemTags array while the
second call will return the correct system tags.
Carl Schwan [Tue, 11 Jan 2022 14:06:54 +0000 (15:06 +0100)]
Fix file picker not respecting hidden files settings
This will only respect the setting inside the file app. For other apps
we will either need to do an API call or add an input field with the
same idea to spare a blocking api call.
Robin Appelman [Thu, 7 Oct 2021 14:11:49 +0000 (16:11 +0200)]
add better index for finding unindexed paths
for the following query 'SELECT "path" FROM "oc_filecache" WHERE ("storage" = $storage) AND ("size" < 0) ORDER BY "fileid" DESC LIMIT 1;'
currently the database will in some cases decide to priorize the sort by fileid over the filter when picking what index to use, resulting in a much slower query.
by creating an index that allows first sorting by fileid and also filter by storage and size this case will be greatly sped up
Vincent Petry [Wed, 12 Jan 2022 10:42:10 +0000 (11:42 +0100)]
Properly abort uploads
Add a new approach for flagging an upload as aborted because we can't
rely on the browser fully cancelling the request as we now seem to
receive an error response from the server instead of a jQuery "abort"
message.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Vincent Petry [Tue, 11 Jan 2022 11:17:23 +0000 (12:17 +0100)]
Trigger "changeDirectory" even on URL change
When using the browser back button or clicking on sections on the left
sidebar (like favorites), the "changeDirectory" jQuery event did not get
called, so apps like recommendations would not notice the directory
change.
This fixes the issue by also setting changeUrl to true when the file
list's directory got changed as a result from a URL change.
Added optional changedThroughUrl argument to make sure the event
recipient knows if the change was done through a URL change and make it
possible prevent a loop in the onDirectoryChange handler that actually
changes the URL when the origin was already from a URL change.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Joachim Bauch [Thu, 16 Dec 2021 08:17:11 +0000 (09:17 +0100)]
Prevent loading images that would require too much memory.
For most image formats, the header specifies the width/height.
PHP allocates an image object from that size, even if the actual
image data is much smaller. This image object size is not limited
by the limit configured in PHP.
The memory limit can be configured through "config.php" setting
"preview_max_memory" and defaults to 128 MBytes which should be
enough for most images without filling up all memory.