prevent event loop reentrance when handling ENCRYPT socket requests
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Wed, 31 Jul 2024 16:14:26 +0000 (18:14 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Wed, 7 Aug 2024 08:13:33 +0000 (10:13 +0200)
commitf2cfd2cc80fd5120a2789914630ee7e69f98335c
treec81d8b48b9bbdbead2d07b724f4bc5d68b608ce8
parent03f87f98e407b77cf92d91cc1e00171848be2467
prevent event loop reentrance when handling ENCRYPT socket requests

when receiving a shell integration socket command for ENCRYPT, a generic
interface and generic code paths was used

the assumption was that the listener socket would need (and remain)
valid while hanlding teh request

some code paths need to display error messages to the user via a
QMessageBox

the issue is that this will execute a Qt event loop that will handle the
socket disconnection while the socket variable from the caller seems it
will stay valid and alive

prevent that by not using a blocking method invocation such that life
time mishandling about the socket listener is not possible

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/gui/socketapi/socketapi.cpp