1
0
Fork 0
Commit Graph

157 Commits

Author SHA1 Message Date
allexzander 9492defbe2 Use separate arguments for a remote root and do not use dav or webdav in the server's URL
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-08-23 15:11:44 +00:00
Felix Weilbach 1e28185ee9 Enforce fetching of user id
With the change of commit 3e61bdc431 and
the relase of v3.3.0 users that had their email address used as login
are not able to login anymore. The dav_user should be empty if users
tried to create a account in the meantime. Therefore we fetch the user
id in the case dav_user (and then Account::_davUser) is empty. We then
store the user id in dav_user.

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-08-11 16:43:11 +00:00
Matthieu Gallien 391935c90f prevent crash in Accont::davPath without credentials
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-29 08:27:53 +00:00
Matthieu Gallien c40d276770 remove dead code around overriding dav path in URL
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-28 12:12:17 +02:00
Matthieu Gallien 77433f7e1d in wizard always use the correct way to get dav path
fixes listing being incorrect when using dav endpoint

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-07-28 09:45:49 +00:00
Felix Weilbach 7112d2aa78 Push Notifications: Reconnect forever if capabilities allow it
Fixes #3115

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-05-04 10:05:19 +02:00
Felix Weilbach b256c6e694 Ping websocket server
This helps the client to recognize if the websocket server is still alive.

Fixes #2983

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-04-13 12:19:40 +00:00
Felix Weilbach c0f09ae12c Don't check against product name if checking server version
We should not rely on the product name because it is something the
user can change in the theming options on the server.

Fixes #3001

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-03-16 14:30:56 +00:00
allexzander 8c4d5333c1 Use push notifications for Tray activities/notifications fetch trigger.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2021-01-27 19:53:28 +02:00
Kevin Ottens 4168c0d082 Avoid keeping Account alive via a shared ptr in ClientSideEncryption
This account object was really only used during the initialization phase
or for forgetting the sensitive data. So let's receive it as parameter
there and pass it on from job to job as needed.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2021-01-26 11:20:13 +00:00
Felix Weilbach 78f00acaa2 Add push notifications for file changes
Resolves #2802

Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
2021-01-25 17:01:09 +00:00
Hannah von Reth 106a35d242
[SSL] Print warning only if something changed 2020-12-15 10:59:06 +01:00
Hannah von Reth ba87fc9e78
[SSL] Properly restore user accepted certificats 2020-12-15 10:59:06 +01:00
Christian Kamm ee6a48b3dc
Client certs: Store pkcs12 in config, password in keychain
It still reads and writes the old format too, but all newly stored
client certs will be in the new form.

For #6776 because Windows limits credential data to 512 bytes in older
versions.
2020-12-15 10:58:43 +01:00
Olivier Goffart 7c1871ae65
Account: Fix crash when deleting an account
We should not have request parented to the account, otherwise we might get
a loop on the deletion order.

Issue #6893
2020-12-15 10:58:21 +01:00
Olivier Goffart 15eab07866
OAuth2: Store 'Account::davUser' in the config, and use that user for connecting
We need to use the user id to check if we are connected to the right account.
These might be different from the HTTP Basic Auth login. (LDAP setups)

When the account was configured as an oauth2 account form the wisard, the
http_user was already set correctly to the user id. But when the server is
upgrading from basic auth to oauth2, we need to pick the right login.

Note that Account::davUser() already defaults to the HTTP user when none
is set, so this means the upgrade will be fine if this is not set in the
config.

Issues:
https://github.com/owncloud/oauth2/issues/109
https://github.com/owncloud/enterprise/issues/2781
2020-12-15 10:58:11 +01:00
Olivier Goffart 52dcfcb166
New Propagation algorithm: Fetch, and emit, the root etag
Remove the feature to concatenate etags as servers that don't
have a root etag are no longer suported
2020-12-15 10:58:07 +01:00
Olivier Goffart afc953b649
Update the minimum supported version
We want to warn if the server version is not supported and did not get
appropriate QA for this client version.

https://github.com/owncloud/enterprise/issues/2687
2020-12-15 10:58:05 +01:00
Kevin Ottens 3427dadaeb
Get rid of FindQt5Keychain.cmake
QtKeychain provides Qt5KeychainConfig.cmake and friends nowadays, so no
need to have a less reliable and outdated find module on our end.

Also this shows that we were including keychain.h in the wrong way and
were not using the link target, so both got fixed as well.

Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-11-02 13:19:48 +01:00
Michael Schuster 902963fa10 Fix issue #2108: Default system proxy not working with Account Wizard
Discovered on Windows in conjunction with PAC scripts:
- Already configured accounts worked
- Fresh client account setup did not work

Reason:
- Proxy was reset over and over again in Account::setCredentials

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-22 11:59:13 +02:00
Kevin Ottens a73a1f3927 Use = default for trivial ctors and dtors
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-25 21:33:24 +02:00
Kevin Ottens 712869db9a Use auto to avoiding repeating type names
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-20 03:54:41 +02:00
Michael Schuster 45b39cdbc1
Add support for the directEditing capability
- Fetch in ConnectionValidator::slotCapabilitiesRecieved
- Add editors to a list made of the new DirectEditor class

TODO:
- Add support for re-fetch and continously check for changes (ETag)

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-01-18 15:07:51 +01:00
Michael Schuster 6a49e787bb 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>
2019-12-08 02:47:22 +01:00
Michael Schuster 76c7ab499f Use ReadPasswordJob::finished for ReadPasswordJob
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-29 13:53:52 +01:00
Michael Schuster dcc84d3508 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>
2019-11-29 13:53:52 +01:00
Camila San 19491ff85f
Once client gets 401/403 from the server, check if remote wipe was requested.
- When the the users logs because of 401 or 403 errors, it checks if the
server requested the remote wipe. If yes, locally deletes account and folders
connected to the account and notify the server. If no, proceeds to ask the
user to login again.
- The app password is restored in the keychain.
- WIP: The change also includes a test class for RemoteWipe.

Signed-off-by: Camila San <hello@camila.codes>
2019-10-17 20:11:31 +02:00
Felix Eckhofer ace142bb23
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>
2019-09-30 17:56:14 +02:00
J-P Nurmi 1af9bf8abc libsync: run clang-tidy modernize-use-nullptr 2018-11-12 18:46:39 +01:00
Olivier Goffart 8484b493e4
ConnectionValidator: change the minimum server version
Forbit connection with server older than 7.0. These server did not have
permission.

Also warn for anything older than 9.1. 9.0 is end of life according to
https://github.com/owncloud/core/wiki/Maintenance-and-Release-Schedule
2018-06-01 13:17:11 +02:00
Daniel Nicoletti a63d34f870 Prepend "nextcloud" for all logging categories
Thus making easier to exclude logging from kio, qt
and only enable "nextcloud.*"
2017-12-28 17:33:10 -02:00
Tomaz Canabrava 33b1fcfe66 Merge branch 'master' into clientSideEncryptionV3 2017-12-12 10:46:43 +01:00
Olivier Goffart 4581d708ff Account: remove dependency with ConfigFile
Part of #6213
2017-12-07 17:39:16 +01:00
Olivier Goffart 753d7addb4 libsync: Fix compilation with TOKEN_AUTH_ONLY
This means we cannot use QtGui in libsync.
So this mostly disable the avatar from the account and the avatarjob

Note that there is one logic change: in ConnectionValidator::slotUserFetched
we do the avatar job even if the user is empty. Otherwise we would end up in
a invalid state. This restore the 2.3.x behavior that was broken in
commit e05d6bfcdc
2017-11-25 12:57:16 +01:00
Tomaz Canabrava 57e0d7abcb [CSE] Fix pointer to e2e
Qt expects things to be pointers even if they are stack
variables.
2017-11-23 16:54:45 +01:00
Tomaz Canabrava 6d464d9dc6 Merge branch 'master-nextcloud' into clientSideEncryptionV3 2017-11-20 18:00:58 +01:00
Christian Kamm b0f986c740 Private links: Account for overwritehost #6146
Retrieve ocs/v1.php/config to determine the desired host and build the
private link urls with that instead.
2017-11-14 12:14:11 +01:00
Tomaz Canabrava a0f0e5617a [CSE] Move the e2e object to the Account
This is important as a lot of the code would start
to rely in direct access to the client side encryption
and there are different keys for different accounts.
2017-11-13 17:22:09 +01:00
Tomaz Canabrava 17693a75e5
[cse] Request public key from server
This is the first step needed to properly communicate.
Next, get private key.
2017-10-18 21:51:37 +02:00
Tomaz Canabrava 29b64640fa
[cse] Start to fetch the basics to fetch the key from the server 2017-10-18 21:51:37 +02:00
Tomaz Canabrava 1c85f94b00
[cse] Use server capabilities to query for cse 2017-10-18 21:51:36 +02:00
Tomaz Canabrava 920047fa70
[CSE] Remove uneeded includes 2017-10-18 21:51:36 +02:00
Tomaz Canabrava 9318c487b9
[CSE] Display menu for encrytp / decryot folders
If the server supports client syde encryption, display
a menu on right click that should display encrypt and decrypt.
ideally it would show the encrypt if the folder is decrypted, and
decrypt if the folder is encrypted but currently there's no way
for the client to know that.
2017-10-18 21:51:36 +02:00
Thomas Müller 315e38e814 Use display-name from the ocs call in the settings dialog 2017-10-06 10:59:20 +02:00
Olivier Goffart ff4213b59f Use the Qt5 connection syntax (automated with clazy)
This is motivated by the fact that QMetaObject::noralizeSignature takes 7.35%
CPU of the LargeSyncBench. (Mostly from ABstractNetworkJob::setupConnections and
PropagateUploadFileV1::startNextChunk). It could be fixed by using normalized
signature in the connection statement, but i tought it was a good oportunity
to modernize the code.

This commit only contains calls that were automatically converted with clazy.
2017-09-21 14:05:39 +02:00
Olivier Goffart 1218a38f2c Include <QAuthenticator> from code that connect to signal that uses it
The new connection syntax will need that
2017-09-21 14:05:39 +02:00
Christian Kamm dca2664707 Private links: Retrieve link through propfind property #6020
* The sharing ui does a propfind anyway: use that to query the new
property as well!
* For the socket api, asynchronously query the server for the right url
when an action that needs it is triggered.

The old, manually generated URL will be used as fallback in case the
server doesn't support the new property or the property can't be
retrieved for some reason.

Depends on owncloud/core#29021
2017-09-19 10:51:03 +02:00
Jocelyn Turcotte a1f1775d15 Move SyncJournalDB to src/common 2017-09-18 14:00:52 +02:00
Christian Kamm 7d075cdcb7 OAuth: Use redirectable jobs for oauth token management 2017-09-15 09:28:03 +02:00
Helmut K. C. Tessarek 709aa27031 remove qt4 code 2017-09-15 07:11:05 +02:00