fetch2: Don't allow '/' in user:pass, fix branch containing '@'
authorMartin Jansa <martin.jansa@gmail.com>
Thu, 16 Jan 2014 14:55:19 +0000 (15:55 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 18 Jan 2014 23:28:13 +0000 (23:28 +0000)
commit2c82742114091cb55055328b54223686816582f2
treed9af7d8194a953c4083026ab9ed4db7aa7033d5d
parent46fd841319479f6079d850b3813e64bd8c2680a3
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

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/bb/fetch2/__init__.py
lib/bb/tests/fetch.py