1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-11-27 06:42:46 +01:00
Commit Graph

13590 Commits

Author SHA1 Message Date
Michael Schuster
de8a7aa680
Fix Activity List: Add check to avoid first empty entry
Add checks to ActivityListModel::combineActivityLists in order to avoid adding
empty Activity entries to the _finalList.

The previous implementation always added an empty entry to the top of the list because
_notificationIgnoredFiles was appended without checking (_listOfIgnoredFiles.size() > 0).

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit cc21d175f1)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-18 03:31:32 +01:00
Michael Schuster
03b11693a3
Fix build for stable-2.6 (changes from PR #1651)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 22:45:47 +01:00
Camila San
23f2d79f70
Bump version to 2.6.2 2019-12-09 21:51:13 +01:00
Michael Schuster
f6db365391
Update translations
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:48:20 +01:00
Michael Schuster
95f74ceb1f
macOS: Rename 'Explorer' appropriately on non-Windows
- Rename it to 'Finder' on macOS.
- This way we also avoid having the whole string re-translated on Transifex.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit b754eacd74)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:46:48 +01:00
Michael Schuster
91be4961d7
Make the ShareDialog background-aware (Dark-/Light-Mode switching)
Use customizeStyle() to change link colours, icons and pixmaps in the ShareDialog and notify
it's widgets via slots.

TODO - known issue (macOS):
- The background and font colours in the ShareUserLine widget still stay the same.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 7ce8a6a201)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:46:48 +01:00
Michael Schuster
b3eb16bfd3
Make SettingsDialog background-aware (Dark-/Light-Mode switching)
Use customizeStyle() to change link colours in the SettingsDialog and notify it's widgets via slots.

Also modify the background colour of the errors messages in AccountSettings::showConnectionLabel
to always use an appropiate colour for it's custom-defined background.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 789a2a7ae3)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:46:47 +01:00
Michael Schuster
52d91ce198
Implement and move some colour-aware helper methods into the Theme class
This introduces a new method to change the colours in the links in QLabel's.
Utilizes a custom crafted RegEx function to replace already-coloured links.

Moved code is based on stuff from the SettingsDialog class.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit be4fc6b887)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:46:47 +01:00
Michael Schuster
c49efcc137
Pick from upstream: Fix too low contrast when tab is selected
The low contrast is also a problem with the Dark Mode on macOS.

For reference please see:
- Commit: 413ef5e96d
- Issue: https://github.com/owncloud/client/issues/7512

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 2dae31486a)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:46:47 +01:00
Michael Schuster
c14556153f
Fix SSL-button's info background color for Dark Mode
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 71f66c6229)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:46:47 +01:00
Michael Schuster
5e1a2a423f
Remove submodule qtmacgoodies and the MacSettingsDialog class
Reverts back to the SettingsDialog class because of bugs and glitches with
more recent Qt versions (Qt 5.12) and with the macOS Dark Mode.

See upstream: https://github.com/owncloud/client/pull/7492

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit b4f926ded7)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-09 21:46:44 +01:00
Michael Schuster
3ac1ba079a
Fix deleteKeychainEntries: Stay consistent with job->setInsecureFallback(false)
We never fall back to the insecure variant in the whole codebase, so don't do it here.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 5869b93acb)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-08 03:10:30 +01:00
Michael Schuster
b7a9cd1d45
Fix Windows key-chunk deletion (too paranoid)
Clear the key chunk buffer, but don't set _clientSslKeyChunkCount to zero because we need it later for deleteKeychainEntries

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit b15eb27aa9)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-08 03:10:29 +01:00
Michael Schuster
c7b0ce036d
Fix member variable name from last refactoring (Windows code)
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 336b64a569)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-08 03:10:29 +01:00
Michael Schuster
f5afa07b0a
Fix Remote Wipe keychain storage
In certain cases don't write the app password in Account::writeAppPasswordOnce:
- id() is empty: This always happend once the Account Wizard showed the folder selection
- appPassword is empty: Caused by Logout -> Relaunch, preventing remote wipe on relaunch

Implement some logging to ease debugging in the future.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 6a49e787bb)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-08 03:10:29 +01:00
Michael Schuster
1b550b976f
Remote Wipe: Implement hack to allow deleting all keychain entries (SSL certs & keys)
Client SSL certificates and keys cannot be deleted at this time because there is
no UI for selecting them on re-login.

We introduce this dirty hack here, to allow deleting them upon Remote Wipe.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 0c5f4a1525)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-08 03:10:29 +01:00
Michael Schuster
68f0b9e0aa
Refactoring: Windows workaround for >= 4k (4096 bit) client-cert SSL keys
WebFlowCredentials:
- Remove _clientSslCaKeyWriteQueue and simply use _clientSslKeyChunkBufferPEM
- Store key's sub-chunks in slots with "." (dot) suffix
- Implement deletion of the key chunks in WebFlowCredentials::deleteKeychainEntries
- Remove spaces in log messages
- Improve code readability

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 6ef9f3cc26)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-08 03:10:29 +01:00
Michael Schuster
8945ef2652
Windows: Workaround for storing >= 4k (4096 bit) client-cert SSL keys
With QtKeychain on Windows, storing larger keys in one keychain entry causes the
following error due to limits in the Windows APIs:
  Error: "Credential size exceeds maximum size of 2560"

To avoid overhead on the other platforms and balance code duplication, this
approach puts some read- and write-parts into Windows-only defines.

For reference also see previous fixes:
- https://github.com/nextcloud/desktop/pull/1389
- https://github.com/nextcloud/desktop/pull/1394

This (again) fixes the re-opened issue:
- https://github.com/nextcloud/desktop/issues/863

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 72be80cbd9)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-08 03:10:26 +01:00
Felix Eckhofer
0cc74d21a2
Use user-provided username in displayName()
This replaces `davUser()`, which is replaced by a numeric ID when using
LDAP, by the username that was actually used for logging in.

Fixes #836

Signed-off-by: Felix Eckhofer <felix@eckhofer.com>
(cherry picked from commit ace142bb23)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 22:28:53 +01:00
Felix Eckhofer
f4c79c8f68
Fix typo
Signed-off-by: Felix Eckhofer <felix@eckhofer.com>
(cherry picked from commit 28da954aad)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 22:24:20 +01:00
Joas Schilling
b6ef8edb12
Use … instead of 3 dots
Signed-off-by: Joas Schilling <coding@schilljs.com>
(cherry picked from commit a4fa8b05e5065da62bb7f6d3cc8c371a2a68ed06)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 21:26:23 +01:00
Joas Schilling
06ffd3e841
Fix some translations
Signed-off-by: Joas Schilling <coding@schilljs.com>
(cherry picked from commit 862342872d9685c8be89406182d471d246c2f9a7)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 21:26:15 +01:00
Joas Schilling
a3596b80e9
Improve the translation of "Share via …"
Signed-off-by: Joas Schilling <coding@schilljs.com>
(cherry picked from commit 98b7d2ebc00ceda1ff74e2adad3b340193e7eb17)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 21:25:43 +01:00
Michael Schuster
8ac1d92161
Fall back to old login flow on GS as this is not yet ready (#2: re-auth)
This commit ensures that the check also occurs on re-authorization in case
the user gets logged out.

See: https://github.com/nextcloud/desktop/pull/1644

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 877fd7abb9)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 21:10:13 +01:00
Roeland Jago Douma
d55f1d5c06
Fall back to old login flow on GS as this is not yet ready
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
(cherry picked from commit 363e62f8fa)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 21:10:02 +01:00
David Kahles
854c637c73
Compare QDateTime objects more efficient
There is no need to call toMSecsSinceEpoch() as QDateTime implements an
comparison operator itself. This is more efficient, because the
QDateTime comparison operator doesn't call localtime() in all cases. Thus, we
don't read /etc/localtime for every comparison. This improves
performance in some cases.

Signed-off-by: David Kahles <david.kahles96@gmail.com>
(cherry picked from commit 9a3aa55b29)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 16:20:27 +01:00
István Váradi
92ad0c4a43
Add libdbus-1-dev to the build dependencies
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
(cherry picked from commit 805b85a4d7)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:27:44 +01:00
Corentin Noël
fb8facb787
Build with libcloudproviders on debian and in the AppImage
Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
(cherry picked from commit 04dd02c295)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:27:02 +01:00
Michael Schuster
30832cc427
MSVC Fix for PR #1526: Fix clang's variadic macro warnings
The recently merged #1526 caused the MSVC Builds on Windows to fail.

This patch sets the new CMake flag only if the compiler it not MSVC.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit a12164ad53)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:21:13 +01:00
Johannes Lorenz
ab7f29c0b2
Fix clang's variadic macro warnings
Using variadic macros like `qCWarning()` without any parameter for "..."
is a GNU extension, which causes a lot of `clang` warnings:

```
desktop/src/common/ownsql.cpp:74:24: warning: must specify at least one
 argument for '...' parameter of variadic macro
 [-Wgnu-zero-variadic-macro-arguments]
        qCWarning(lcSql) << "Error:" << _error << "for" << filename;
                       ^
/usr/include/qt/QtCore/qloggingcategory.h:140:11: note: macro 'qCWarning'
 defined here
          ^
```

This patch tells `clang` to be silent.

Signed-off-by: Johannes Lorenz <j.git@lorenz-ho.me>
(cherry picked from commit 8c334a1f43)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:20:56 +01:00
Camila San
6500442217
Merge the list of ignored files/symlinks into one Activity notification.
Signed-off-by: Camila San <hello@camila.codes>
(cherry picked from commit 8546d53b05)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:12:11 +01:00
Dominique Fuchs
0e6a9fd0c1
Don't need a second if for non-Windows, using Qt macro for platform check
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit 7750d2198d)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:05:06 +01:00
Dominique Fuchs
ed7c489722
Fixed typo preventing successful path rename on Win and modified ASSERT for Window path styles
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit f993e7c555)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-05 20:04:25 +01:00
Michael Schuster
d4b9b5129a
Fix copyright year in MacOSXBundleInfo.plist.in for 2019
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 407864c40e)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-29 17:27:15 +01:00
Michael Schuster
4a79e24db2
Use ReadPasswordJob::finished for ReadPasswordJob
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 76c7ab499f)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-29 15:59:33 +01:00
Michael Schuster
215d185fbe
Fix remote wipe keychain storage (issue #1592)
The app password for the remote wipe was constantly being written in
WebFlowCredentials::slotFinished to the keychain, leading to unnecessary
write and log overhead on the system.

This fix introduces a check to only store the app password once in
a lifetime of the Account class. Also the method used to store the
password will be renamed from setAppPassword to writeAppPasswordOnce
to be more expressive.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit dcc84d3508)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-29 15:59:30 +01:00
Andreas Wunderlich
6f273bf7dd
Revert default remote poll interval back from 5 seconds to 30 seconds
Signed-off-by: Andreas Wunderlich <code@andwun.me>
(cherry picked from commit f293dbfeeb)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-28 18:08:22 +01:00
Michael Schuster
f2bc25c9ca macOS build: Avoid the Get-Task-Allow Entitlement (Notarization)
Setting CODE_SIGN_INJECT_BASE_ENTITLEMENTS to NO is required for macOS
Notarization.

See: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues

And upstream: 97f4af32ae

Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-27 15:19:41 +01:00
István Váradi
ca6de6128f
Build for Debian stable and oldstable
Signed-off-by: István Váradi <ivaradi@varadiistvan.hu>
(cherry picked from commit 2fc76c2b24)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-27 15:09:50 +01:00
Christoph Wurst
a1e5e6ca40
Fix legal notice year
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
(cherry picked from commit 923abd8d0b)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-27 15:09:38 +01:00
Michael Schuster
cf8bb1c5bc
Merge pull request #1622 from nextcloud/backport/1621/stable-2.6
[stable-2.6] Add timestamp to Mac installer code signing
2019-11-17 20:35:16 +01:00
Michael Schuster
ebe1cef357 Add timestamp to Mac installer code signing
Use the --timestamp option for 'productsign' to add a secure timestamp.

See: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues

Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 19:33:56 +00:00
Michael Schuster
922d14f016
Fix: add /usr/local/lib to LD_LIBRARY_PATH for OpenSSL 1.1.1
Drone pipeline qt-5.12 failed because the unit tests didn't find OpenSSL.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit fce0a50e37)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 03:23:45 +01:00
Michael Schuster
7a0c6a2f8f
Fix: escape env vars
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit c047232c3b)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 03:23:42 +01:00
Michael Schuster
f35a2c0b2c Bump Qt 5.12.5 image
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit a846f0276d)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 03:23:37 +01:00
Michael Schuster
c6b22089e3
Fix dir in upload script
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 801098f546)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 02:17:02 +01:00
Michael Schuster
cf0082f92f
Make AppImage upload optional and add timeout
Moves the upload into a separate Drone command and adds a timeout for curl
to fail after 15 minutes.

Returns zero to keep Drone from failing.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 4fc8936553)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 02:17:00 +01:00
Michael Schuster
f4e129d4e2 Move .desktop file path to new env var to avoid duplicates
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit dd0135ce2e)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 02:16:55 +01:00
Michael Schuster
ec6eaf2121 Upgrade for Qt 5.12.5 in docker-ci
- Use the new image: nextcloudci/client-5.12:client-5.12-5
- Use it's new QT_BASE_DIR: /opt/qt5.12.5

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit d830a1c5f7)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-17 02:13:03 +01:00
Michael Schuster
1dc1f91620
Fix: Apply http2 patch from owncloud #1573 - only with Qt >= 5.8
Drone builds failed with Qt 5.7 and we introduce a new ifdef here
to avoid patching specifically for Ubuntu Xenial only.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 5131463644)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-14 03:33:49 +01:00