Commit graph

9263 commits

Author SHA1 Message Date
Claudio Cambra
74d1629ad9
Extract custom color svg image finding into separate function
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:53:29 +08:00
Claudio Cambra
1284749d70
Simplify findSvgFilePath, define result value on definition
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:53:28 +08:00
Claudio Cambra
9df47cf1cc
Simplify loop to write bytes to password
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:32:28 +08:00
Claudio Cambra
4c8007e461
Use std::array to store hash bytes
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:32:28 +08:00
Claudio Cambra
b404f1a546
Replace use of std::rand with improved C++11 random
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:32:28 +08:00
Claudio Cambra
f9ded784b5
Guarantee that the generated password for share will have all the types of characters needed to pass server check
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:32:28 +08:00
Claudio Cambra
32acf504cb
Simplify password generation in sharemodel
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:32:28 +08:00
Claudio Cambra
c4d1bdf46f
Generate better passwords for shares
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:32:27 +08:00
Claudio Cambra
d0e8e67c72
Track invalid input in ShareDetailsPage expireDateSpinBoxTextField
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:17:30 +08:00
Claudio Cambra
00ec93f031
Add ability for NCInputTextField to display red border when invalid input provided
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:17:29 +08:00
Claudio Cambra
da7d8c1f0a
Ensure the text for the expire date spin box is updated even in situations when the expire date is forced back down to the same one being currently held
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:17:29 +08:00
Claudio Cambra
aaeaad9918
Make sure to imperatively set text for spinbox textfield after user breaks binding by editing
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:17:29 +08:00
Claudio Cambra
e84a5dcb5f
Rename "moreMenu" ColumnLayout to "scrollContentsColumn" in ShareView, stop treating like menu which it used to be
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-20 23:17:29 +08:00
Dries Mys
9256417612 Create placeholder while dehydrating if needed
When replacing an OnlineOnly file by another one, the file maintains it
OnlineOnly pin state, but it is converted to a regular file. So, the
dehydration should convert the regular file to a (dehydrated)
placeholder instead of trying to update the (non-existing) placeholder.

Closes #4274

Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
2023-07-20 15:07:46 +02:00
Dries Mys
55f27cdb96 Small coding improvements
Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
2023-07-20 13:44:55 +02:00
Dries Mys
e9aa97682c Remove warning when querying pin state on non-placeholder file
F.ex. Folder::slotWatchedPathChanged calls this function on non-
placeholder files to check if the ignored file is already assigned an
Excluded pin state. Note that it is allowed to set the pin state to
Excluded on non-placeholder files.

Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
2023-07-20 13:44:55 +02:00
Dries Mys
76376aa052 Set VFS PinState to Excluded for ignored files.
Setting PinState to Excluded ensures the syncing icon is not shown for ignored items.
If the PinState is not set to Excluded, also all parent directories are shown as being synced, which is very inconvenient for the end user as it seems that some folder are never fully synced by Nextcloud which isn't the case.
As long as .lnk files are not converted to placeholder files, also set them to Excluded to hide the syncing icon.

Closes #5524
Closes #5594

Co-authored-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
Signed-off-by: Dries Mys <dries.mys@my-dreams.be>
2023-07-20 13:44:55 +02:00
Claudio Cambra
d6125ca3a1 Swap folder nullness assert for return
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
Claudio Cambra
c1b2e07e8c Compress share page tab button width and height when sharing API is disabled
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
Claudio Cambra
bccdb0e8f7 Make swipeIndex properties readonly
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
Claudio Cambra
98ec8ff302 Fix background of tabbar in file details page
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
Claudio Cambra
3fda519050 Do not handle setting page to sharing page if sharing not available
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
Claudio Cambra
ea5397865d Do not display sharing entry if sharing is not available on server
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
Claudio Cambra
4bcff7d991 Set sharingAvailable property in FileDetails from Folder account capabilities
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
Claudio Cambra
38d82dfb5f Add sharingAvailable property to FileDetails class
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-07-18 15:49:17 +02:00
tomdereub
39e59a1c79 windows reserved word silently excluded - csync exclude.cpp
Proposal to solve https://github.com/nextcloud/desktop/issues/3826, by excluding silently windows reserved word like $RECYCLE.BIN.

Signed-off-by: tomdereub <pbtom@lamonerie.net>
2023-07-18 10:57:17 +02:00
alex-z
6ea828936f
Fix crash in _finalList removal loop. Fix incorrect implementation of seen chat notifications removal. Improved notifications fetch code to avoid multiple calls from different threads.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-07-18 09:57:13 +02:00
alex-z
71f1d1aad4 Added new state and new job to check if /index.php/204 is being redirected.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-07-17 11:31:15 +02:00
Matthieu Gallien
bc28bc43c3 set read only/read file on the newly downloaded file
will fix behavior on windows by properly setting the new temp file just
downloaded have the proper state (read only or read/write) and not the
already existing file that will be replaced by the newly odwnloaded one

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-07-12 13:42:34 +02:00
Matthieu Gallien
845c66666e fix failing tests by using FileSystem::setFileReadOnlyWeak
we try to preserve complex existing permissions unless the client is
required to change them significantly

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-07-12 13:42:31 +02:00
Matthieu Gallien
0039ffd7da always propagate locked status to read-only or read/write for real file
make sure that a file locked that would not be modifiable by the
current client is read-only on storage

also make sure we make a file read/write when modification can happen
again

Close #5537

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-07-12 13:41:46 +02:00
Matthieu Gallien
8cd1a30c40 fix bulk upload of empty files
force an empty body when we bulk upload empty files

force a "valid" checksum to be computed for empty files as bulk upload
server side expects a checksum even for empty files

Close #5824

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-07-10 10:38:39 +02:00
alex-z
b56200e0d7 Remove seen Talk notificatios from Tray window.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-07-06 09:15:26 +02:00
Matthieu Gallien
10cac0f46f fix review comments
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
0b3d67437a improve logs of e2ee such that errors are easy to see
removed some internal debug logs that should not be needed

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
1712f98b3c make sure to pass shared pointer by const ref when possible
avoid unnecessary copies of shared pointers

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
af1162804a make sure we clean only what is needed if e2ee is disabled
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
b9761a23fe tidy code
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
fad55470d5 ensure e2ee can be disabled from client
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
ad34de1622 make sure e2ee init is either fully done or not at all
make sure that we have only two cases:
1) keys are stored on the server and the client
2) keys are stored on the server and not yet on the client

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
bef5d1a893 if keys are not on server, also delete local keys
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
c8e5ac7b5f fix upload of private key when initializing the end-to-end encryption
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
3a0e0f2097 can now generate the CSR again if the first try to upload failed
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
50234c5859 try to resend the public key if it is not on server but on local storage
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
d3b583d967 improvement to be able to retry the e2ee init steps
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
17484cd69f finish local save of keys and upload them to server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
1b7c16e8ff solve memory mismanagement of object life time
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
1cb632234c e2ee init rework
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
15f3e2acae backup private key early
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 15:32:03 +02:00
Matthieu Gallien
da8fa7bfa7 prevent crash by resetting common pointer after deleting gobject menu
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-06-30 10:19:59 +02:00