Skip to content

Commit

Permalink
Disable credentials handling for insecure repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernd Wachter committed Mar 30, 2013
1 parent 3836244 commit 678531b
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ssuurlresolver/ssuurlresolver.cpp
Expand Up @@ -104,6 +104,11 @@ void SsuUrlResolver::run(){
} else
ssuLog->print(LOG_DEBUG, "Device not registered -- skipping credential update");

// resolve base url
resolvedUrl = ssu.repoUrl(repo, isRnd, repoParameters);

// only do credentials magic on secure connections
if (resolvedUrl.startsWith("https://")){
// TODO: check for credentials scope required for repository; check if the file exists;
// compare with configuration, and dump credentials to file if necessary
ssuLog->print(LOG_DEBUG, QString("Requesting credentials for '%1' with RND status %2...").arg(repo).arg(isRnd));
Expand All @@ -118,12 +123,12 @@ void SsuUrlResolver::run(){
}
} else
ssuLog->print(LOG_DEBUG, "Skipping credential update due to missing credentials scope");
}

if (headerList.isEmpty()){
resolvedUrl = ssu.repoUrl(repo, isRnd, repoParameters);
} else {

if (!headerList.isEmpty()){
resolvedUrl = QString("%1?%2")
.arg(ssu.repoUrl(repo, isRnd, repoParameters))
.arg(resolvedUrl)
.arg(headerList.join("&"));
}

Expand Down

0 comments on commit 678531b

Please sign in to comment.