[bitbake-devel] [PATCH 3/3] fetch2/wget: Fix authentication in checkstatus() of the wget fetcher

Andre McCurdy armccurdy at gmail.com
Tue Mar 19 06:28:41 UTC 2019


On Mon, Mar 18, 2019 at 7:08 AM Stefan Klug <stefan.klug at baslerweb.com> wrote:
>
> I wonder how this used to work for anybody.

No need to wonder when you have access to the git history... :-)

  http://git.openembedded.org/bitbake/commit/?id=cea8113d14da9e12db80a5b6b5811a47a7dfdeef

It looks like ud.user used to contain both the username and
password... and when that changed, download() was updated but
checkstatus() was not:

  http://git.openembedded.org/bitbake/commit/?id=6a917ec99d659e684b15fa8af94c325172676062

> Signed-off-by: Stefan Klug <stefan.klug at baslerweb.com>
> ---
>  lib/bb/fetch2/wget.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/bb/fetch2/wget.py b/lib/bb/fetch2/wget.py
> index e2037511..3addb219 100644
> --- a/lib/bb/fetch2/wget.py
> +++ b/lib/bb/fetch2/wget.py
> @@ -322,8 +322,8 @@ class Wget(FetchMethod):
>                  authheader =  "Basic %s" % encodeuser
>                  r.add_header("Authorization", authheader)
>
> -            if ud.user:
> -                add_basic_auth(ud.user, r)
> +            if ud.user and ud.pswd:
> +                add_basic_auth(ud.user + ':' + ud.pswd, r)
>
>              try:
>                  import netrc, urllib.parse
> --
>
>
> --
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel


More information about the bitbake-devel mailing list