From: Ciaran Gultnieks Date: Wed, 2 Oct 2013 09:25:26 +0000 (+0100) Subject: Don't try and parse username/password out of repo address except for svn X-Git-Tag: 0.1~387 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8f8360fcf6b494608c0ab970c0d45685ac9ca52e;p=fdroidserver.git Don't try and parse username/password out of repo address except for svn --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index ad49d4aa..dda00f02 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -53,19 +53,18 @@ class vcs: self.sdk_path = sdk_path # It's possible to sneak a username and password in with - # the remote address... (this really only applies to svn - # and we should probably be more specific!) - index = remote.find('@') - if index != -1: - self.username = remote[:index] - remote = remote[index+1:] - index = self.username.find(':') - if index == -1: - raise VCSException("Password required with username") - self.password = self.username[index+1:] - self.username = self.username[:index] - else: - self.username = None + # the remote address for svn... + self.username = None + if self.repotype() == 'svn': + index = remote.find('@') + if index != -1: + self.username = remote[:index] + remote = remote[index+1:] + index = self.username.find(':') + if index == -1: + raise VCSException("Password required with username") + self.password = self.username[index+1:] + self.username = self.username[:index] self.remote = remote self.local = local