Commit Graph

3275 Commits

Author SHA1 Message Date
Camila Ayres
56e3b284c1 feat: migrate global network settings to account specific network settings.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-07-16 19:21:37 +02:00
Camila Ayres
e591644914 feat: all proxy settings are account specific settings.
The default is to use QNetworkProxy::NoProxy.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-07-16 19:21:37 +02:00
Camila Ayres
1696549a83 feat: remove "Network" action.
- Remove global proxy and network options from UI.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-07-16 19:21:37 +02:00
Matthieu Gallien
9712fe221c
fix: use proper categorized logging
Co-authored-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2025-07-16 17:40:44 +02:00
Matthieu Gallien
ffc5d7653f
fix: use proper categorized logging
Co-authored-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
2025-07-16 17:40:34 +02:00
Rello
2492c0548a
fix: Add consistent logging to CFAPI callbacks
Signed-off-by: Rello <Rello@users.noreply.github.com>
2025-07-16 17:39:20 +02:00
Matthieu Gallien
39979f30de fix(windows/compatibility): rename automatically a file if is local
we would automatically rename a file with an invalid name

do this if the newly discovered file is local and not if it is on the
server (which would fail because the local file does not exists at all)

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-07 10:27:13 +02:00
Matthieu Gallien
acd27f1068 fix(sync): allow leading space file names on Windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-07 09:39:50 +02:00
Matthieu Gallien
a2d6b7616a fix(code/style): use const almost always (always when possible)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-01 14:27:59 +02:00
Matthieu Gallien
4fcf31cb0b fix(permissions): decode share "no download" permission
ensure we use currently existing server API to get the "no download"
permission

requires parsing some share-attributes new DAV property

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-07-01 14:27:59 +02:00
Rello
b2d9086a50
Merge branch 'nextcloud:master' into master 2025-06-23 18:17:27 +02:00
Matthieu Gallien
dac875ab89 fix(readonly): better handling of ACL on read-only files on windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-18 12:08:29 +02:00
Matthieu Gallien
d70771958d fix(crash): debug builds would not try to remove a not found job
in release builds we would happily try to remove an element from QList
with invalid index (-1) if the job is not found

avoid doing this in release builds and keep teh assert in debug builds

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-18 09:16:32 +02:00
Matthieu Gallien
99d4f16435 fix(windows/virtualFiles): prevent implicit hydration at API level
use the dedicated flag from CfApi to prevent self implicit hydration
requests

should ensure even more reliable handling of virtual files

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-07 18:08:39 +02:00
Matthieu Gallien
1ecab229d6 fix(warning): avoid compilation warning by specifying type
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-06 11:57:27 +02:00
Matthieu Gallien
a60e34cd82 perf(logs): do not print processing lines for not important instructions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-05 15:47:37 +02:00
Matthieu Gallien
c837e1c010 fix(tests): will currently detect wrong attempts to access deleted files
with virtual files we may wrongly try to access a file we just deleted

in which case an assert should ensure we capture this during automated
tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-05 14:01:38 +02:00
Matthieu Gallien
d082f839d0 fix(logs): make one log message useful
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-05 14:01:38 +02:00
Rello
1ec8fe63ac Change qCDebug error logs to qCWarning 2025-06-05 09:24:32 +02:00
Matthieu Gallien
1144ac4fd3 fix(get/file): avoid failing to download files under 20 MiB
if a file that uncompresses to a file size under 10 MiB, Qt will allow
it

for files with an higher size, they must not have higher compression
ratio than what Qt network stack expect

https://doc.qt.io/qt-6/qnetworkrequest.html#setDecompressedSafetyCheckThreshold

we will use a 2 times bigger threshold

Close https://github.com/nextcloud/desktop/issues/7470

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-04 13:52:57 +02:00
Jyrki Gadinger
27ede927d4 fix(lockfilejobs): ensure using correct file path
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-06-02 15:59:17 +02:00
Matthieu Gallien
e555434e41 fix(readonly): avoid changing permissions when not needed
in FilePermissionsRestore, first checks the folder permissions before
changing them

will avoid useless call changing permissions when not needed

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-02 12:14:35 +02:00
Matthieu Gallien
3c8aeee167 fix(readonly): avoid implicit hydration when modifying permissions
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-06-02 10:59:31 +02:00
François Guerraz
6ee1231148 Fix(gui/SslErrorDialog): implement parsing Strict-Transport-Security
This commit implements enabling enableStrictTransportSecurityStore
and setStrictTransportSecurityEnabled in the AccessManager-
provided QNetworkAccessManager.
On first connection, this will make QNetworkAccessManager save the
HSTS status of the host in cache if it was enabled by the server.
On future connections, this setting is loaded and if the server
presents an invalid certificate and the HSTS hint is not expired, the
connection fails without showing the dreaded "Cannot connect securely
to ..." dialog.

Signed-off-by: François Guerraz <francois@orographic.uk>
2025-05-28 09:44:50 +02:00
rakekniven
631377a32d chore(i18n): Aligned spelling of "cannot"
Reported at Transifex

Signed-off-by: rakekniven <2069590+rakekniven@users.noreply.github.com>
2025-05-28 08:51:38 +02:00
Jyrki Gadinger
415a6e4366 fix(propagator): touch folder paths if permissions changed
Extra safeguard to ensure that the usage of
`FileSystem::setFolderPermissions` won't start a new sync run if
FolderWatcher/inotify detects a change in the file metadata...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-05-28 08:51:08 +02:00
Jyrki Gadinger
d9a0a6eab3 fix(filesystem): only change folder permissions if required
On Linux changing the permissions causes inotify to create a IN_ATTRIB
event -- even if the permissions stays the same.

Such an event is passed to the filesystem watcher which lets the client
schedule a new sync run.  In certain conditions, this could happen
during every sync run...

Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-05-28 08:51:08 +02:00
Matthieu Gallien
9ab875af0d fix(permissions): handle properly CanRead permission from server
if Readable permissions is missing, do nto try to download the file

if a file was downlaoded but Readable permission is now missing, remove
it

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-26 18:45:06 +02:00
alex-z
c25de8500e
Implement BulkPropagateDownloadJob for virtual files.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2025-05-26 16:48:53 +02:00
Matthieu Gallien
67bf4054dc fix(encryption): remove currently broken certificate hash handling
we may not currently properly store certificate hash for encrypted items
and later fails to find which public or private key pairs to use

for now, it is better to remove it and ensure we have a reliable way to
handle certificate migration

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-26 14:55:57 +02:00
Matthieu Gallien
c62ce64b01 fix(readonly): ignore move to trash for read-èonly items
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
db58703fc0 fix(delete): fix move to trash when parent folder is read-only
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
584c81321f fix(delete): optimize item exist checks when propagating from server
QFileInfo::exists(filename) is the fastest method

alos avoid creating too many QFileInfo instances when we need it for
multiple purposes

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
99d48e20f6 fix(delete): always print warnings when file deletions fail
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-22 09:05:32 +02:00
Matthieu Gallien
9dd719c5ae
fix(quota): do not prevent upload when quota info are not available
if we did not query the server info, we have no quota info
so do not prevent upload because of no quota info available

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-15 17:59:54 +02:00
Matthieu Gallien
96df5cb0a6
fix(windows): add missing version to cfapi shell integration DLL
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-13 17:21:01 +02:00
Camila Ayres
071c1efd41
fix(migration): migrate general network settings.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-11 16:18:43 +02:00
Rello
d141093945
Update src/libsync/bulkpropagatorjob.cpp
Co-authored-by: Jyrki Gadinger <nilsding@nilsding.org>
Signed-off-by: Rello <Rello@users.noreply.github.com>
2025-05-09 15:06:43 +02:00
Rello
876731f9fb
Update bulkpropagatorjob.cpp
Signed-off-by: Rello <Rello@users.noreply.github.com>
2025-05-09 12:05:28 +02:00
Matthieu Gallien
a0532921ca fix(readonly): apply ACL also to files inside read-only folders
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-09 09:43:16 +02:00
Matthieu Gallien
de546bd549 fix(readonly): enable MOVE rollback when folder is read-only
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-09 09:42:35 +02:00
Matthieu Gallien
15fafa0774 fix(rename): avoid failing hard when rename is rejected by server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2025-05-09 09:42:11 +02:00
Jyrki Gadinger
d458c2c620 chore: remove never used crashreporter
Signed-off-by: Jyrki Gadinger <nilsding@nilsding.org>
2025-05-08 09:52:53 +02:00
Andy Scherzinger
48e53ea216
docs(reuse): Migrate to SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2025-05-07 23:06:34 +02:00
Camila Ayres
80f787979b refactor(quota): use const; make logs less verbose.
- Add {} to single line if.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-07 19:09:36 +02:00
Camila Ayres
f677fda071 fix(quota): use _filesNeedingScheduledSync to delay sync of files exceeding quota.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-07 19:09:36 +02:00
Camila Ayres
d0ea889f98 fix(quota): show personal files instead of empty string when error message is about root folder.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-07 19:09:36 +02:00
Camila Ayres
3c8eb21a95 fix(quota): if item is new and parent dir has been renamed, quota is always 0.
Also moved quota check to a function.

Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-07 19:09:36 +02:00
Camila Ayres
4935cc55a6 fix(quota): check for the quota of the original parent folder, not of the renamed one (0 bytes available).
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-07 19:09:36 +02:00
Camila Ayres
35b49a454a fix(quota): only check for quota for items with a parent folder that exist and that are not blacklisted.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2025-05-07 19:09:36 +02:00