Commit 499014fa authored by Aard's avatar Aard

[ssu] Don't break on query strings in predefined URLs

parent 053ec4f8
......@@ -10,6 +10,7 @@
#include <QCoreApplication>
#include <QFileInfo>
#include <QStringList>
#include <QUrl>
#include <systemd/sd-journal.h>
#include "libssu/sandbox_p.h"
......@@ -154,9 +155,14 @@ void SsuUrlResolver::run(){
ssuLog->print(LOG_DEBUG, QString("Skipping credential for %1 with scope %2").arg(repo).arg(credentialsScope));
if (!headerList.isEmpty() && !resolvedUrl.isEmpty()){
resolvedUrl = QString("%1?%2")
.arg(resolvedUrl)
.arg(headerList.join("&"));
QUrl url(resolvedUrl);
if (url.hasQuery()){
url.setQuery(url.query() + "&" + headerList.join("&"));
} else
url.setQuery(headerList.join("&"));
resolvedUrl = url.toString();
}
// TODO, we should bail out here if the configuration specifies that the repo
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment