Skip to content

Commit

Permalink
Fix distribution credentials
Browse files Browse the repository at this point in the history
problem with /register creating the wrong url for authz creds, and the creation of the credz for the distribution destination had a syntax error.

TODO: distribution test needed for this.
Signed-off-by: Jim Klo <jim.klo@sri.com>
  • Loading branch information
jimklo committed May 18, 2012
1 parent fc7a30f commit 209e4fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion LR/lr/controllers/distribute.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def doDistribution(connectionInfo, server, sourceUrl):

credential = sourceLRNode.getDistributeCredentialFor(destinationUrl)
if credential is not None:
parsedUrl = urlparse.urlparse()
parsedUrl = urlparse.urlparse(destinationUrl)
destinationUrl = destinationUrl.replace(parsedUrl.netloc, "{0}:{1}@{2}".format(
credential['username'], credential['password'], parsedUrl.netloc))

Expand Down
2 changes: 1 addition & 1 deletion LR/lr/controllers/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _publishConnection(self,destUrl,username,password,contact):
urllib2.urlopen(destUrl)
conn = NodeConnectivityModel(connectionInfo)
result = conn.save()
destinationURL = urlparse.urljoin(destUrl.strip(),"destination")
destinationURL = urlparse.urljoin(destUrl.strip(),"incoming")
if bool(username) and bool(password):
sourceLRNode.addDistributeCredentialFor(destinationURL,username,password)
if result["OK"]:
Expand Down

0 comments on commit 209e4fc

Please sign in to comment.