diff options
| author | saturneric <[email protected]> | 2026-09-24 19:49:19 +0200 |
|---|---|---|
| committer | saturneric <[email protected]> | 2026-09-24 19:49:19 +0200 |
| commit | 5ed546041aa6016f9bc6f5e11a1f34533df42f62 (patch) | |
| tree | 14138751c36e4881a5b9729e738039d31473c015 /src | |
| parent | refactor(gnupg): trigger info gathering from tab (diff) | |
| download | modules-5ed546041aa6016f9bc6f5e11a1f34533df42f62.tar.gz modules-5ed546041aa6016f9bc6f5e11a1f34533df42f62.zip | |
fix(sync): time out key uploads
- set a 15-second transfer timeout for upload requests
- prevent waiting events from hanging when uploads receive no response
Diffstat (limited to 'src')
| -rw-r--r-- | src/m_key_server_sync/PKSInterface.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/m_key_server_sync/PKSInterface.cpp b/src/m_key_server_sync/PKSInterface.cpp index 1ad8fb3..9963776 100644 --- a/src/m_key_server_sync/PKSInterface.cpp +++ b/src/m_key_server_sync/PKSInterface.cpp @@ -283,6 +283,9 @@ void PKSInterface::UploadKey(const QString& url, const QByteArray& key_data) { GFAppUserAgent(GFModuleSdkContext())); request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); + // Like every other request here: an upload that never answers would leave + // the event that asked for it waiting for ever. + request.setTransferTimeout(15000); post_data.append("keytext").append("=").append(data); |
