mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 04:45:43 +03:00
Merge pull request #6958 from nextcloud/bugfix/preventCrashOnEncryptShellIntegrationRequests
prevent event loop reentrance when handling ENCRYPT socket requests
This commit is contained in:
commit
5ed29db71d
1 changed files with 7 additions and 0 deletions
|
@ -444,6 +444,13 @@ void SocketApi::slotReadSocket()
|
|||
<< "with argument:" << argument;
|
||||
socketApiJob->failure(QStringLiteral("command not found"));
|
||||
}
|
||||
} else if (command.startsWith("ENCRYPT")) {
|
||||
if (indexOfMethod != -1) {
|
||||
ASSERT(thread() == QThread::currentThread())
|
||||
staticMetaObject.method(indexOfMethod)
|
||||
.invoke(this, Qt::QueuedConnection, Q_ARG(QString, argument.toString()),
|
||||
Q_ARG(SocketListener *, listener.data()));
|
||||
}
|
||||
} else {
|
||||
if (indexOfMethod != -1) {
|
||||
// to ensure that listener is still valid we need to call it with Qt::DirectConnection
|
||||
|
|
Loading…
Reference in a new issue