1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-09-29 09:42:45 +02:00
Commit Graph

12647 Commits

Author SHA1 Message Date
Tomaz Canabrava
7e83f0591b [CSE] Create the Encrypted File on Disk 2017-12-20 22:32:38 +01:00
Tomaz Canabrava
3760b86e07 [CSE] Mobe fileEncryption to a static function
and I'll move all of those to a namespace latter.
2017-12-20 22:28:01 +01:00
Tomaz Canabrava
20198c5c7b Merge branch 'clientSideEncryptionV3' of github.com:nextcloud/client into clientSideEncryptionV3 2017-12-20 22:11:46 +01:00
Roeland Jago Douma
3c301a8282
Add missing FolderMetadata functions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 22:08:57 +01:00
Roeland Jago Douma
74bc9213c5
Generate encrypted metadata on the fly
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 22:04:26 +01:00
Tomaz Canabrava
679bb1f18e [CSE] Expose EncryptionHelper 2017-12-20 21:33:25 +01:00
Tomaz Canabrava
14b18b146d Merge branch 'clientSideEncryptionV3' of github.com:nextcloud/client into clientSideEncryptionV3 2017-12-20 21:29:54 +01:00
Roeland Jago Douma
5e23ca9658
FolderMetaData: store metadataKeys in a QMap
* This allows us to pick the right key for files

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 21:25:27 +01:00
Roeland Jago Douma
b9f094cd94
Store metadata keys as keys
Don't store them base64 encoded. But store them directly useable
2017-12-20 21:17:41 +01:00
Roeland Jago Douma
c35b57cfba
Parse the files in the metadata
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 20:49:16 +01:00
Tomaz Canabrava
1e899f4172 [CSE] Do not create QPointer from raw pointers 2017-12-20 20:00:59 +01:00
Tomaz Canabrava
0347cf4e9e [CSE] Store the sharing keys in memory 2017-12-20 19:40:58 +01:00
Roeland Jago Douma
fc73ad7476
Salt should not be hardcoded
We append the salt (just like the IV) to the ciphertext of the private
key. This means we also have to split it off properly.

This breaks compartibility with currently stored keys on your server.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 16:07:33 +01:00
Markus Goetz
067508c082 VERSION.cmake: This branch is now 2.4.1 2017-12-20 16:03:35 +01:00
Roeland Jago Douma
b924ad7282
Lower mnemonic when generating password
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 15:41:38 +01:00
Roeland Jago Douma
4551bbe0e0
Forget key + cert + mnemonic on account removal
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 15:35:23 +01:00
Roeland Jago Douma
a48a3e0acc
Cleanup old functions
Those functions had no use anymore since we store the key and cert in
the keychain. Removed them so we don't use them by accident.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 13:41:13 +01:00
Roeland Jago Douma
ee281963fe
Base64 magic:
* metadata keys: bin -> b64 -> enc -> b64
* sharing metadat: string -> b64 -> enc -> b64

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-20 10:22:35 +01:00
Jenkins for ownCloud
79065ba5c6 [tx-robot] updated from transifex 2017-12-20 02:18:53 +01:00
Tomaz Canabrava
ab89231ca2 [CSE] Remove unused debug 2017-12-20 00:25:56 +01:00
Tomaz Canabrava
d26ade1870 [CSE] Fix the result of the decryption
However the text still looks like encrypted.
2017-12-20 00:25:39 +01:00
Tomaz Canabrava
a1e6901ecc [CSE] Decrypt correctly the metadata
There's a bug that's returning an empty bytearray, need to look
into that.
2017-12-20 00:20:27 +01:00
Tomaz Canabrava
494ae31de9 [CSE] Fix correct json object 2017-12-19 23:09:39 +01:00
Tomaz Canabrava
a02246dc65 [CSE] Fix Metadata bugs p1
The RFC was misleading, I took the chance to fix a few
inconsistencies regarding the QJsonDocument.
2017-12-19 22:47:05 +01:00
Tomaz Canabrava
5609a1dbe8 [CSE] Remove old debug code so I can focus. 2017-12-19 17:02:23 +01:00
Jenkins for ownCloud
3fbd156c83 [tx-robot] updated from transifex 2017-12-19 02:18:35 +01:00
Jenkins for ownCloud
8fb191afcf [tx-robot] updated from transifex 2017-12-18 02:18:34 +01:00
Tomaz Canabrava
aa36cc4a5c [CSE] Reduce probability of conflicts when rebasing
Creates a new file/class to handle upload,
propagateuploadencrypted.h/cpp. This should have all the logic to deal
with the encryption and upload.
2017-12-17 22:38:43 +01:00
Tomaz Canabrava
b9cdc8e922 [CSE] Fix the url to delete the metadata 2017-12-17 21:19:32 +01:00
Tomaz Canabrava
23f832caf4 [CSE] Code Cleanup 2017-12-17 19:19:44 +01:00
Tomaz Canabrava
7ef2489f1d [CSE] Fix infoForFileId
We need to traverse the path recursivelly.
2017-12-17 19:14:34 +01:00
Jenkins for ownCloud
ab37856a91 [tx-robot] updated from transifex 2017-12-17 02:18:35 +01:00
Hefee
844e03d000 Also disable fstack-protector for alpha plattform.
This fixes #6211.

(cherry picked from commit 69e81e8f65)
2017-12-16 14:08:08 +01:00
Hefee
69e81e8f65 Also disable fstack-protector for alpha plattform.
This fixes #6211.
2017-12-16 14:03:59 +01:00
Jenkins for ownCloud
46e796303e [tx-robot] updated from transifex 2017-12-16 02:18:35 +01:00
Tomaz Canabrava
ce41e3e42f [CSE] Work the Set Decrypted Bit 2017-12-15 23:32:41 +01:00
Olivier Goffart
1940c2f9bf Exclude: Use Qt to load the exclude file
fopen does not work well with relative path tand forward slashes on windows
This fix the windows textexcludedfiles test.
And also make the code simpler.

Note that the 'trimmed' might be a behavior change, but i think it is ok
2017-12-15 19:16:20 +01:00
Christian Kamm
83e94c3ec7 Fix compile after rebase 2017-12-15 18:05:44 +01:00
Christian Kamm
a7c0cfc8eb Upload conflict files #4557
If the server has the 'uploadConflictFiles' capability conflict
files will be uploaded instead of ignored.

Uploaded conflict files have the following headers set during upload
  OC-Conflict: 1
  OC-ConflictBaseFileId: 172489174instanceid
  OC-ConflictBaseMtime: 1235789213
  OC-ConflictBaseEtag: myetag
when the data is available. Downloads accept the same headers in return
when downloading a conflict file.

In the absence of server support clients will identify conflict files
through the file name pattern and attempt to deduce the base fileid.
Base etag and mtime can't be deduced though.

The upload job for a new conflict file will be triggered directly from
the job that created the conflict file now. No second sync run is
necessary anymore.

This commit does not yet introduce a 'username' like identifier that
automatically gets added to conflict file filenames (to name the files
foo_conflict-Fred-1345.txt instead of just foo_conflict-1345.txt).
2017-12-15 18:03:53 +01:00
Christian Kamm
7ae8ba35de Remove unused csync test file
Now found at
test/csync/csync_tests/check_csync_update.cpp
2017-12-15 18:02:04 +01:00
Christian Kamm
8eebc53728 Unify item type enum
Previously, there was csync_ftw_type_e and SyncFileItem::Type. Having
two enums lead to a bug where Type::Unknown == Type::File that went
unnoticed for a good while.

This patch keeps only a single enum.
2017-12-15 18:02:04 +01:00
Tomaz Canabrava
2e516dfc67 Merge branch 'clientSideEncryptionV3' of github.com:nextcloud/client into clientSideEncryptionV3 2017-12-15 15:05:51 +01:00
Tomaz Canabrava
250c8ff1bf [CSE] Add job to delete metadata
This is needed for the correct functioning of the Set Folder
as Decrypted
2017-12-15 15:02:43 +01:00
Olivier Goffart
ee366df58f Fix the TestFolderMan on Windows 2017-12-15 14:51:00 +01:00
Olivier Goffart
482ee875a1 Fix TestSyncEngine on windows 2017-12-15 14:39:01 +01:00
Tomaz Canabrava
5607e27f20 [CSE] Actually save the http response result 2017-12-15 14:25:57 +01:00
Olivier Goffart
b10edfecfc Workaround MSVC bug with enum in bitfield
MSVC stores the enum as signed in the bitfield (contrary to the C++ spec)
Which means that once we store a value such as SyncFileItem::DetailError
in a bitfield, we get a negative value back, then of course, further
comparison fails.
2017-12-15 14:18:45 +01:00
Tomaz Canabrava
43332d3ac7 [CSE] Properly update UI status to encrypted / decrypted 2017-12-15 14:00:42 +01:00
Roeland Jago Douma
8c178bd035
Merge pull request #95 from nextcloud/fix-libcloudproviders-conditions
Fix build on windows
2017-12-15 12:58:13 +01:00
Julius Härtl
49a16ffb4b
Fix build on windows
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-12-15 10:59:14 +01:00