From: Christian Kamm Date: Fri, 15 Sep 2017 07:24:56 +0000 (+0200) Subject: AbstractNetworkJob: Allow relative redirect X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~701^2~95 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b92de38c3126aa6222cf23d46c9b9b3556b91bb6;p=nextcloud-desktop.git AbstractNetworkJob: Allow relative redirect Previously all redirects were considered absolute. --- diff --git a/src/libsync/abstractnetworkjob.cpp b/src/libsync/abstractnetworkjob.cpp index de68182ef..f5f4b9d62 100644 --- a/src/libsync/abstractnetworkjob.cpp +++ b/src/libsync/abstractnetworkjob.cpp @@ -173,6 +173,10 @@ void AbstractNetworkJob::slotFinished() if (_followRedirects && !redirectUrl.isEmpty()) { _redirectCount++; + // Redirects may be relative + if (redirectUrl.isRelative()) + redirectUrl = requestedUrl.resolved(redirectUrl); + // For POST requests where the target url has query arguments, Qt automatically // moves these arguments to the body if no explicit body is specified. // This can cause problems with redirected requests, because the redirect url