All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andre McCurdy <armccurdy@gmail.com>
To: Stefan Klug <stefan.klug@baslerweb.com>
Cc: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: Re: [PATCH 3/3] fetch2/wget: Fix authentication in checkstatus() of the wget fetcher
Date: Mon, 18 Mar 2019 23:28:41 -0700	[thread overview]
Message-ID: <CAJ86T=VCGsyMeV+=EOZnhi7yND6sRPJntF=izk4QWa_nRCz_nA@mail.gmail.com> (raw)
In-Reply-To: <20190318135820.7344-4-stefan.klug@baslerweb.com>

On Mon, Mar 18, 2019 at 7:08 AM Stefan Klug <stefan.klug@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@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@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/bitbake-devel


      reply	other threads:[~2019-03-19  6:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 13:58 [PATCH 0/3] Fix some bitbake authentication issues Stefan Klug
2019-03-18 13:58 ` [PATCH 1/3] fetch2: Fix fetching of git repositories with kerberos authentication Stefan Klug
2019-03-18 23:44   ` Richard Purdie
2019-03-18 13:58 ` [PATCH 2/3] fetch2: Gracefully handle corrupt download-cache tarballs Stefan Klug
2019-03-18 23:45   ` Richard Purdie
2019-03-18 13:58 ` [PATCH 3/3] fetch2/wget: Fix authentication in checkstatus() of the wget fetcher Stefan Klug
2019-03-19  6:28   ` Andre McCurdy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJ86T=VCGsyMeV+=EOZnhi7yND6sRPJntF=izk4QWa_nRCz_nA@mail.gmail.com' \
    --to=armccurdy@gmail.com \
    --cc=bitbake-devel@lists.openembedded.org \
    --cc=stefan.klug@baslerweb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.