* Resolves: https://github.com/nextcloud/server/issues/48629
While the database supports NULL, the typing has always said it only returns *string*.
So to not break any apps that might trust the typings we should return `''` if the database is set to `NULL`.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Currently there is a problem if an exception is thrown in `User::delete`,
because at that point the user is already removed from the backend,
but not all data is deleted.
There is no way to recover from this state, as the user is gone no information is available anymore.
This means the data is still available on the server but can not removed by any API anymore.
The solution here is to first set a flag and backup the user home,
this can be used to recover failed user deletions in a way the delete can be re-tried.
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This crash was mostly happening when using external storages and for example the command "occ memories:migrate-google-takeout"
Signed-off-by: Vincent FarZz <farcry69@live.fr>
- check for token collisions and retry up to three times.
- throw after 3 attempts without finding a unique token.
Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com>
nextcloud-init-sync.lock is used by nextcloud/docker to prevent running the initialization script on multiple containers at the same time.
Ref: https://github.com/nextcloud/docker/issues/2299.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage.
The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder.
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
NC_ env variable overrides were not appearing in
the output of `occ config:list system` nor `occ
config:system:get xxx`. This was creating nearly
impossible to diagnose configuration/ behavior
disprepancies.
- Refactored readData() so that we aren't saving
the entire environment in the envCache anymore
(only those prefixed "NC_") and so that we save
NC_ provided config values under their real
key.
- Refactored getValue() to accommodate readData()
refactor
- Fixed getKeys() to properly return
envCache keys too
Environment provided config variables now appear
in `occ config:list system` as expected.
Environment provided config variables now appear
when queried via `occ config:system:get KEY`
envCache is now free of non-NC stuff.
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>