<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11262</bug_id>
          
          <creation_ts>2017-03-28 20:10:14 +0000</creation_ts>
          <short_desc>wget.py: Handling of ud.user is wrong/outdated</short_desc>
          <delta_ts>2017-03-31 09:16:38 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Holger Freyther">holger</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71827</commentid>
    <comment_count>0</comment_count>
    <who name="Holger Freyther">holger</who>
    <bug_when>2017-03-28 20:10:14 +0000</bug_when>
    <thetext>We have a recipe that is downloading files from a password protected http server. We ask our users to put SRC_URI_pn-NAME = &quot;https://USER:PASS@url&quot; into the local.conf.

This is broken with the current wget fetcher. It seems that it expects that ud.user contains &quot;USER:PASS&quot; 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(&quot;:&quot;)
-            fetchcmd += &quot; --user=%s --password=%s --auth-no-challenge&quot; % (up[0],up[1])
+        if ud.user and ud.pswd:
+            fetchcmd += &quot; --user=%s --password=%s --auth-no-challenge&quot; % (ud.user, ud.pswd)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71898</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-03-30 10:46:44 +0000</bug_when>
    <thetext>I took a look at the other usages and I think its correct elsewhere, it was just this case that was broken. I&apos;ve sent out the patch and queued it, thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71945</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-03-31 09:16:38 +0000</bug_when>
    <thetext>Fixed with http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f46846dc118a3132eee5aeddb43570b8343afc0a, thanks zecke!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>