diff options
author | Martin Jansa <martin.jansa@gmail.com> | 2014-01-21 16:46:28 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-17 14:44:30 +0000 |
commit | e8dfafda71b7340004ce5ecdc60a63d27664ceaf (patch) | |
tree | d9f7b83b4eca53c129f71be92155ec1d982931a9 /bitbake/lib/bb/fetch2/__init__.py | |
parent | f0b1753b90ea6e2f34228d092fcef682d94dd1a0 (diff) | |
download | poky-e8dfafda71b7340004ce5ecdc60a63d27664ceaf.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: 3c694e20df3b1d442603300786580e4b2f4bf5f3)
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/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index b9f673c214..1cda059f6d 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 | ||