Bug 11262 - wget.py: Handling of ud.user is wrong/outdated
Summary: wget.py: Handling of ud.user is wrong/outdated
Status: RESOLVED FIXED
Alias: None
Product: BitBake
Classification: Build System, Metadata & Runtime
Component: bitbake (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3 M4
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-03-28 20:10 UTC by Holger Freyther
Modified: 2017-03-31 09:16 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Freyther 2017-03-28 20:10:14 UTC
We have a recipe that is downloading files from a password protected http server. We ask our users to put SRC_URI_pn-NAME = "https://USER:PASS@url" into the local.conf.

This is broken with the current wget fetcher. It seems that it expects that ud.user contains "USER:PASS" and is then doing a string split (which it should limit to 1). But the password is actually already inside the ud.pswd variable.

Something like this (incomplete as there are more usages of ud.user) could fix it:

-        if ud.user:
-            up = ud.user.split(":")
-            fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (up[0],up[1])
+        if ud.user and ud.pswd:
+            fetchcmd += " --user=%s --password=%s --auth-no-challenge" % (ud.user, ud.pswd)
Comment 1 Richard Purdie 2017-03-30 10:46:44 UTC
I took a look at the other usages and I think its correct elsewhere, it was just this case that was broken. I've sent out the patch and queued it, thanks.
Comment 2 Richard Purdie 2017-03-31 09:16:38 UTC
Fixed with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f46846dc118a3132eee5aeddb43570b8343afc0a, thanks zecke!