summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorMartin Jansa <martin.jansa@gmail.com>2014-01-16 15:55:19 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-18 23:29:07 +0000
commita99fa6ded13a62c3552d37563b1d299e2522d02a (patch)
tree58401c1ab2c9001333975a80abf20fd0873b2a2c /bitbake/lib/bb/fetch2
parent19c75e92a1b8eac8cb24ae8f1d5f99cf9df913ff (diff)
downloadpoky-a99fa6ded13a62c3552d37563b1d299e2522d02a.tar.gz
bitbake: fetch2: Don't allow '/' in user:pass, fix branch containing '@'
* currently decode_url regexp parses branch=@foo as username so it ends like this: - ('git', '', 'foo', 'git.openembedded.org/bitbake;branch=', '', {}) + ('git', 'git.openembedded.org', '/bitbake', '', '', {'branch': '@foo'}) * http://hg.python.org/cpython/file/2.7/Lib/urlparse.py also assumes that there is at least one '/' as separator between netloc and path, params, so it looks reasonable to prevent including '/' in username (Bitbake rev: 2c82742114091cb55055328b54223686816582f2) Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 9499a911b5..8f195f2cd9 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -329,7 +329,7 @@ def decodeurl(url):
329 user, password, parameters). 329 user, password, parameters).
330 """ 330 """
331 331
332 m = re.compile('(?P<type>[^:]*)://((?P<user>.+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url) 332 m = re.compile('(?P<type>[^:]*)://((?P<user>[^/]+)@)?(?P<location>[^;]+)(;(?P<parm>.*))?').match(url)
333 if not m: 333 if not m:
334 raise MalformedUrl(url) 334 raise MalformedUrl(url)
335 335