1
0
Fork 0
Commit Graph

113 Commits

Author SHA1 Message Date
ckamm ec7333a4bf Merge pull request #5272 from owncloud/licensefix-pending
License: Adjust license of GPLv2 source files to GPLv2+
2016-11-18 15:14:47 +01:00
Christian Kamm 10644d3568 Move concatUrl and settingsWithGroup to Utility
There was little reason to keep them cluttering Account.
2016-10-25 12:05:28 +02:00
Christian Kamm cf48ea2e00 Remove unused functions
Account::changed and AbstractCredentials::changed have not been needed
in a long while.
2016-10-25 11:33:38 +02:00
Christian Kamm db24f60ae3 License: Adjust license of GPLv2 source files to GPLv2+
See #5180
2016-10-25 11:06:54 +02:00
Olivier Goffart 54a278edb9 fix compilation with TOKEN_AUTH_ONLY 2016-02-05 15:30:29 +01:00
Jocelyn Turcotte 8486a2fd2b Bring back the automatic authentication popups
Users have complained that they don't see the notification when it is
shown and are not aware that their files aren't syncing.

Remove the non-interactive credentials fetch logic and add make sure
that the shibboleth popup will flash in the taskbar instead.
This will still not allow the popup to show in front in all cases,
but this is a compromise that we have to chose.

This reverts commit dcb687929f.
Issue https://github.com/owncloud/enterprise/issues/990
2016-01-22 14:25:36 +01:00
Olivier Goffart 81b7798ac2 HttpCredentials::slotAuthentication: fix comment
The recent revert did no fix the comment
2016-01-07 14:58:02 +01:00
Olivier Goffart 868d4c781a HTTP creds: Fix GUI blocking for 5 seconds when entering wrong password
The Qt HTTP thread calls authenticationRequired (indirectly) using a
BlockingQueuedConnection. So when we call invalidateToken from slot
connected to this signal and end up calling QNAM::clearAccessCache which
waits on the thread for 5 seconds

Backtraces:

Qt HTTP thread:
 #0  0x00007ffff20c707f in pthread_cond_wait@@GLIBC_2.3.2 ()
 #1  0x00007ffff43f0c0b in QWaitConditionPrivate::wait
 #2  QWaitCondition::wait
 #3  0x00007ffff43ea06b in QSemaphore::acquire
 #4  0x00007ffff45dcf6f in QMetaObject::activate
[...]
 #9  0x00007ffff45dd607 in QMetaObject::activate
 #10 0x00007ffff4edbaf7 in QHttpNetworkReply::authenticationRequired
 #11 0x00007ffff4e0b2b4 in QHttpNetworkConnectionPrivate::handleAuthenticateChallenge
 #12 0x00007ffff4e10753 in QHttpNetworkConnectionChannel::handleStatus
 #13 0x00007ffff4e11cc9 in QHttpNetworkConnectionChannel::allDone
 #14 0x00007ffff4e14605 in QHttpProtocolHandler::_q_receiveReply

Main Thread:
 #0  0x00007ffff20c7428 in pthread_cond_timedwait@@GLIBC_2.3.2 ()
 #1  0x00007ffff43f0b56 in QWaitConditionPrivate::wait_relative (time=5000, this=0x136c580)
 #2  QWaitConditionPrivate::wait (time=5000, this=0x136c580)
 #3  QWaitCondition::wait (this=this@entry=0x136c788, mutex=mutex@entry=0x136c760, time=time@entry=5000)
 #4  0x00007ffff43efa6e in QThread::wait (this=<optimized out>, time=time@entry=5000)
 #5  0x00007ffff4e1edd3 in QNetworkAccessManagerPrivate::clearCache
 #6  0x00007ffff7b6fb03 in OCC::HttpCredentials::invalidateToken()
 #7  0x000000000057adb4 in OCC::AccountState::slotInvalidCredentials()
 #8  0x000000000057ac76 in OCC::AccountState::slotConnectionValidatorResult(OCC::ConnectionValidator::Status, QStringList const&) ()
 #9  0x00000000005ab45c in OCC::AccountState::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)
 #10 0x00007ffff45dcd30 in QMetaObject::activate
 #11 0x00007ffff7b78671 in OCC::ConnectionValidator::connectionResult(OCC::ConnectionValidator::Status, QStringList) ()
 #12 0x00007ffff7ae2514 in OCC::ConnectionValidator::reportResult(OCC::ConnectionValidator::Status) ()
 #13 0x00007ffff7ae39b7 in OCC::ConnectionValidator::slotAuthFailed(QNetworkReply*) ()
 #14 0x00007ffff7b784a9 in OCC::ConnectionValidator::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
 #15 0x00007ffff45dcd30 in QMetaObject::activate
 #16 0x00007ffff7b766dc in OCC::AbstractNetworkJob::networkError(QNetworkReply*)
 #17 0x00007ffff7af9f6e in OCC::AbstractNetworkJob::slotFinished()
 #18 0x00007ffff7b7654d in OCC::AbstractNetworkJob::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
 #20 0x00007ffff45dd607 in QMetaObject::activate
 #21 0x00007ffff4edd143 in QNetworkReply::finished
 #22 0x00007ffff4e3fec7 in QNetworkReplyHttpImplPrivate::finished
 #23 0x00007ffff4e41818 in QNetworkReplyHttpImpl::close
 #24 0x00007ffff7b7047b in OCC::HttpCredentials::slotAuthentication(QNetworkReply*, QAuthenticator*) ()
 #25 0x00007ffff7b79092 in OCC::HttpCredentials::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
 #27 0x00007ffff45dd607 in QMetaObject::activate
 #28 0x00007ffff4e1d6fb in QNetworkAccessManager::authenticationRequired
 #29 0x00007ffff4e1ea07 in QNetworkAccessManagerPrivate::authenticationRequired
 #30 0x00007ffff4e3c784 in QNetworkReplyHttpImplPrivate::httpAuthenticationRequired

Another case of Main Thread:
 #5  0x00007ffff4e1edd3 in QNetworkAccessManagerPrivate::clearCache
 #6  0x00007ffff7b6fb03 in OCC::HttpCredentials::invalidateToken()
 #7  0x000000000057b1e4 in OCC::AccountState::slotInvalidCredentials() ()
 #8  0x00000000005abb8a in OCC::AccountState::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
 #9  0x00007ffff45dcd30 in QMetaObject::activate
 #10 0x00007ffff7b76ed5 in OCC::Account::invalidCredentials() ()
 #11 0x00007ffff7ad55f5 in OCC::Account::handleInvalidCredentials()
 #12 0x00007ffff7afa69a in OCC::AbstractNetworkJob::slotFinished()
 #13 0x00007ffff7b7654d in OCC::AbstractNetworkJob::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
 #15 0x00007ffff45dd607 in QMetaObject::activate
 #16 0x00007ffff4edd143 in QNetworkReply::finished
 #17 0x00007ffff4e3fec7 in QNetworkReplyHttpImplPrivate::finished
 #18 0x00007ffff4e41818 in QNetworkReplyHttpImpl::close
 #19 0x00007ffff7b7047b in OCC::HttpCredentials::slotAuthentication(QNetworkReply*, QAuthenticator*) ()
 #20 0x00007ffff7b79092 in OCC::HttpCredentials::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) ()
 #22 0x00007ffff45dd607 in QMetaObject::activate
 #23 0x00007ffff4e1d6fb in QNetworkAccessManager::authenticationRequired
2016-01-07 14:46:49 +01:00
Markus Goetz ef9483c82d Revert "HTTP Creds: Do not send the password at every request"
We need this for #4326

This reverts commit ae17f58b80.
2016-01-06 11:50:52 +01:00
Christian Kamm 4dfce57a58 Creds: Forget password on explicit sign-out #4241 2015-12-09 11:31:37 +01:00
Markus Goetz 9337927722 legacy propagator: Remove more code 2015-10-28 10:59:02 +01:00
Markus Goetz c8590c4468 Remove legacy propagator and neon
The code was already uneeded/unbuilt on Windows and OS X.
2015-10-20 17:57:43 +02:00
Phil Davis f0e17fd9c0 libtypos comment and message typos for master 2015-10-05 09:05:09 +05:45
Jocelyn Turcotte 128d46e19a Remove *Credentials::_fetchJobInProgress
Now that fetchFromKeychain is solely called from AccountState::slotInvalidCredentials
and that this one already protects the fetch call using _waitingForNewCredentials,
we can remove that extra check.
2015-09-05 16:00:45 +02:00
Jocelyn Turcotte 6d027ebd40 Separate the credential dialog from their fetch #3350
This moves the responsibility of asking the user or not for
credentials from the Credentials classes back to the AccountState.
fetch() now only extract credentials from the keychain, reports
the result to the AccountState which then decides if askFromUser()
should be called or not. The result is once more reported to the
AccounState.

This also replaces the HttpCredentials::queryPassword virtual
which now lets HttpCredentialsGui and HttpCredentialsText do it
the way that they prefer.
2015-09-05 16:00:45 +02:00
Jocelyn Turcotte 89f69209dd Simplify the authentication code paths #3350
The AccountState is now the only class responsible for triggering credentials
fetching from the keychain or from the user.

With the ShibbolethRefresher out of the question it's possible
to remove the invalidateAndFetch virtual and manually call invalidateToken.
This also allows us to move that code from Account to AccountState.
In the end this also allows us to move the fetch() call from the
ConnectionValidator and use the same code path as for invalid credentials.
2015-09-05 16:00:45 +02:00
Jocelyn Turcotte 94a57fe8d5 Get rid of ShibbolethRefresher
This is only for neon and not necessary if we want to show a notification
instead of a login window when the network reports invalid credentials.
2015-09-05 15:45:54 +02:00
Jocelyn Turcotte dcb687929f Show a notification instead of a login window on startup #3350
The original problem is that showing a popup not originated
from the main settings window while it's focused won't be
shown in front to the user.

This try not to highjack the user's attention of the user
by showing a notification when checking the connection for
valid credentials, and require the user to sign in through
the UI. There are still issues with showing that popup from
the tray icon, but the user will most likely be looking for
the popup in that case. The new sign in button directly in
the settings account works properly.
2015-09-01 18:40:20 +02:00
Jocelyn Turcotte 628957de21 Remove the _readPwdFromDeprecatedPlace codepath
This was introduced in 1.6.2 to read the password from earlier versions.
People upgrading from 1.5 to 2.1 will sadly need to re-enter their password.
2015-09-01 18:40:20 +02:00
Christian Kamm 5d9e752c71 HttpCreds: Add keychain failure hint. #3268 2015-07-17 14:39:43 +02:00
Olivier Goffart bdf5029d47 HTTP cred: properly forget the password when signing out #3462
QNAM do not sign out by itself, it keeps the password in cache.

Qt5 has a function to clear the cache. On Qt4 we reset the QNAM
2015-07-16 17:00:14 +02:00
Olivier Goffart c56cb2235c Missing EXPORT macro 2015-06-23 00:53:32 +02:00
Olivier Goffart ce0a0e3f0d Credential: move the implementation to the gui 2015-06-15 17:39:28 +02:00
Olivier Goffart 6e337ad242 Move Account::settings to AccountState::settings
It is only used by the GUI. Also return a unique_ptr to make the ownership clearer
2015-06-15 17:39:28 +02:00
Olivier Goffart 716b0c68da Merge remote-tracking branch 'origin/master' into new-ui 2015-05-12 15:20:40 +02:00
Olivier Goffart ae17f58b80 HTTP Creds: Do not send the password at every request 2015-04-27 16:28:37 +02:00
Olivier Goffart be1b39067d Merge branch 'master' into new-ui 2015-04-27 12:32:12 +02:00
Christian Kamm 89bb58ac30 Ensure 'user' is available early enough for ui in httpcreds 2015-04-23 15:47:49 +02:00
Olivier Goffart 6c73f25747 HTTP creds: Fix translation of the password input dialog
tr() needs Q_OBJECT
2015-04-17 12:19:37 +02:00
Christian Kamm ba0c3256fa Remove unused HttpConfigFile. 2015-03-27 13:20:10 +01:00
Christian Kamm 588129d852 HttpCreds: Delete password from old location. #2186 2015-03-27 10:40:19 +01:00
Christian Kamm 3cef771868 HttpCreds: Fill pw dialog with previous password. #2848 #2879 2015-03-26 09:25:45 +01:00
Klaas Freitag c88742fad3 Revert "SetupW: Display proper error messages if password or user was wrong."
This reverts commit 396f38598f.

This adds redundant code and potentially breaks Shibboleth
2015-03-10 11:17:35 +01:00
Klaas Freitag 396f38598f SetupW: Display proper error messages if password or user was wrong.
If the password or user was wrong during setup, the client showed a
ConnectionClosed error instead of a proper Username or password wrong
message. This was because in HTTPCredentials::slotAuthentication, the
reply is closed, and a property is set to indicate the auth problem.

This patch now checks at all occurences of networkErrors if it might
have been an authentication problem, and displays something useful.

There is a good chance that this is a sufficient fix for
owncloud/enterprise#556
2015-03-06 16:41:59 +01:00
Markus Goetz ec03ebd69f Token Auth: Allow empty token
Just username/password. The received token will automatically be stored
inside the QNetworkCookieJar.
2015-02-27 11:58:18 +01:00
Daniel Molkentin 99d674c346 Default shiboolethwebview to 900x700, remember last size
Also add host to the title

Addresses #2285
2015-02-17 15:28:14 +01:00
Daniel Molkentin 3439ea395b Remove one more mention of certDate 2015-02-12 12:43:41 +01:00
Daniel Molkentin ba3bab8f49 Remove certificateDate property and other superfluous code 2015-02-12 12:37:42 +01:00
Olivier Goffart 4f202e5f4c Fix TokenCredentials compilation 2015-02-11 18:10:01 +01:00
Olivier Goffart 34237f604e JsonApiJob: Refactor out of the shibbolethuserjob 2015-02-05 15:42:01 +01:00
Jocelyn Turcotte 43a51c1bef Fix the MinGW build
- qtkeychain isn't necessarily in a qt5keychain subdirectory.
- Explicitly add OpenSSL to the include directories
- Make sure that the USE_OUR_OWN_SQLITE3 code is initialized
  for csync by calling find_package.
2015-02-04 14:50:38 +01:00
Christian Kamm 5fc231cda4 Shib: Fix fetching of 'user'. #2751 2015-01-28 15:15:35 +01:00
Olivier Goffart d70e146c1f Merge remote-tracking branch 'origin/ssl_client_cert'
Conflicts:
	CMakeLists.txt
	csync/src/CMakeLists.txt
	csync/src/csync_owncloud.c
2015-01-28 14:13:40 +01:00
Olivier Goffart b0dbb49ca8 Shib: fix broken signal/slot connections 2015-01-26 16:23:43 +01:00
Nourredine ba8b1bbe06 adds 'SSL client certificate' support from n.octeau with qknight changes as:
* removed broken QSsl::SslV3 default
* rewrote slotHandleErrors(): no longer claim errors which are none.
* hack reverted: lib64 was not the cause for NixOS issues related to libraries.
* refactored csync/src/csync_owncloud.c and discovered+fixed why the dav_connect was never getting the certPath+certPassoword
* cleanup of code but seems this crushed the ssl client certificate support
* fixes the https://github.com/owncloud/client/issues/69#issuecomment-69358377 issue
* lots of cleanup
* From TODO list : translate all french comments into english
* changed _pemCertificate type from QString to QByteArray
2015-01-21 23:55:11 +00:00
Christian Kamm aa6a5e4ac2 Credentials: Use the bound account everywhere.
This is preparation for multiaccount.
2015-01-16 15:22:56 +01:00
Christian Kamm 4fa212c43b CSync callbacks: Don't use global account. 2014-12-18 15:39:51 +01:00
Christian Kamm 38ebfec1fb Use global Account/AccountState less.
* Use a shared pointer to Account everywhere to ensure
  the instance stays alive long enough for a sync to terminate
* Folder is now tied to an AccountState
* SyncEngine and OwncloudPropagator tie to an Account and use that
  for all jobs they run

Issue: Since the setup wizard currently always replaces the
account, it will always wipe all folder definitions, even when
the actual changes to the account were minor.
2014-12-18 15:39:51 +01:00
Christian Kamm 53d5de685c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/gui/folder.cpp
	src/gui/folder.h
	src/libsync/networkjobs.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagatedownload.cpp
2014-12-10 13:01:36 +01:00
Daniel Molkentin d5f2c36abd Mirall -> (Desktop) Client 2014-12-08 17:54:32 +01:00
Daniel Molkentin 3016844dd7 Merge branch 'master' into rename_client
Conflicts:
	README.md
	src/gui/folderman.cpp
	src/gui/settingsdialog.cpp
	src/libsync/accessmanager.cpp
	src/libsync/propagateupload.h
2014-12-02 13:37:22 +01:00
Olivier Goffart 512492bf30 Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/libsync/propagatedownload.cpp
2014-12-01 14:37:47 +01:00
Daniel Molkentin 281c0e1553 Merge branch 'master' into rename_client
Conflicts:
	CMakeLists.txt
	src/gui/main.cpp
	src/libsync/accessmanager.cpp
	src/libsync/accessmanager.h
	src/libsync/owncloudpropagator_p.h
2014-11-12 00:07:59 +01:00
Daniel Molkentin 2db17a57d2 Fix header names 2014-11-09 23:25:57 +01:00
Daniel Molkentin ae85aa33fd Adjust namespaces 2014-11-09 22:34:07 +01:00
Daniel Molkentin f2eadacf09 Remove "Mirall" from class names 2014-11-09 22:30:29 +01:00
Olivier Goffart de11f602d5 Merge remote-tracking branch 'origin/il'
Conflicts:
	csync/src/csync_private.h
	src/CMakeLists.txt
	src/gui/folder.cpp
	src/libsync/owncloudpropagator.cpp
	src/libsync/owncloudpropagator.h
	src/libsync/propagator_qnam.cpp
	src/libsync/propagator_qnam.h
	src/libsync/syncengine.cpp
	src/libsync/syncengine.h
	src/mirall/syncjournaldb.cpp
2014-11-08 10:48:36 +01:00
Brandon Coleman e5b03634ae correct spelling on user is empty error. 2014-10-25 11:01:58 -05:00
Christian Kamm 7ae0338f5c Merge remote-tracking branch 'origin/1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/socketapi.h
	src/libsync/syncengine.h
	test/CMakeLists.txt
2014-10-22 10:41:55 +02:00
Olivier Goffart 50e718b1e7 Merge branch '1.7'
Conflicts:
	src/CMakeLists.txt
	src/cmd/cmd.cpp
	src/gui/folder.cpp
	src/gui/socketapi.cpp
	translations/mirall_ca.ts
	translations/mirall_cs.ts
	translations/mirall_de.ts
	translations/mirall_el.ts
	translations/mirall_en.ts
	translations/mirall_es.ts
	translations/mirall_es_AR.ts
	translations/mirall_et.ts
	translations/mirall_eu.ts
	translations/mirall_fa.ts
	translations/mirall_fi.ts
	translations/mirall_fr.ts
	translations/mirall_gl.ts
	translations/mirall_hu.ts
	translations/mirall_it.ts
	translations/mirall_ja.ts
	translations/mirall_nl.ts
	translations/mirall_pl.ts
	translations/mirall_pt.ts
	translations/mirall_pt_BR.ts
	translations/mirall_ru.ts
	translations/mirall_sk.ts
	translations/mirall_sl.ts
	translations/mirall_sv.ts
	translations/mirall_th.ts
	translations/mirall_tr.ts
	translations/mirall_uk.ts
	translations/mirall_zh_CN.ts
	translations/mirall_zh_TW.ts
2014-09-18 17:10:21 +02:00
Daniel Molkentin 4fc044d368 Merge branch 'master' into move_lib_to_sep_dir
Conflicts:
	cmake/modules/NSIS.template.in
	src/CMakeLists.txt
	src/creds/shibboleth/authenticationdialog.cpp
	src/creds/shibboleth/authenticationdialog.h
	src/gui/owncloudgui.cpp
	src/libsync/creds/shibboleth/authenticationdialog.cpp
	src/libsync/creds/shibboleth/authenticationdialog.h
	src/libsync/mirallaccessmanager.cpp
	src/mirall/authenticationdialog.cpp
	src/mirall/authenticationdialog.h
2014-08-12 21:08:44 +02:00
Daniel Molkentin bb32831a60 Merge remote-tracking branch 'origin/master' into move_lib_to_sep_dir
Conflicts:
	src/gui/folderman.cpp
2014-07-17 11:31:45 +02:00
Daniel Molkentin df3c3bca02 Split into three separate projects: library, gui and cmd 2014-07-11 11:07:31 +02:00