From: Kevin Ottens Date: Tue, 6 Oct 2020 15:28:20 +0000 (+0200) Subject: Use friendly user agent during webflow2 auth X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~22^2~119^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=3d8af05037f04f51b1505f5aa87c5b1a5826c849;p=nextcloud-desktop.git Use friendly user agent during webflow2 auth This way the server displays a less scary string while granting access from the browser. Also this same string will be used in the "Devices and sessions" section of the server settings. Signed-off-by: Kevin Ottens --- diff --git a/src/gui/creds/flow2auth.cpp b/src/gui/creds/flow2auth.cpp index b4e826d46..790318e83 100644 --- a/src/gui/creds/flow2auth.cpp +++ b/src/gui/creds/flow2auth.cpp @@ -82,6 +82,7 @@ void Flow2Auth::fetchNewToken(const TokenAction action) // add 'Content-Length: 0' header (see https://github.com/nextcloud/desktop/issues/1473) QNetworkRequest req; req.setHeader(QNetworkRequest::ContentLengthHeader, "0"); + req.setRawHeader("User-Agent", Utility::friendlyUserAgentString()); auto job = _account->sendRequest("POST", url, req); job->setTimeout(qMin(30 * 1000ll, job->timeoutMsec()));