BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001404 [BusyBox] Networking Support major always 06-26-07 02:31 06-27-07 14:41
Reporter iggarpe View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0001404: wget authentication error
Description Looks like the HTTP authentication code is broken. When updating a dyndns dynamic host, wget fails with the following error message:

badauthwget: error getting response: Bad file descriptor

This works fine in busybox 1.2.1.

URL Example (replace user, password myhost.dyndns.org and 127.0.0.1 with valid values):

wget -qO - http://user:password@members.dyndns.org/nic/update/?system=dyndns\&hostname=myhost.dyndns.org\&myip=127.0.0.1 [^]

Additional Information
Attached Files

- Relationships

- Notes
(0002516)
iggarpe
06-26-07 03:15

It seems that bb_uuencode is badly broken and is corrupting the host_info structure when the authentication user is uuencoded.

Replacing the bb_uuencode call by the old base64enc code (see wget.c in busybox 1.2.1) solves the problem.

Will investigate further what's going on, but thought this info is worth being known before the bug is assigned.
 
(0002523)
vda
06-26-07 07:26

I bet the mistake is here: sizeof(buf) is wrong, third parameter is length of SOURCE, not dest! Should be strlen(target.user)...

if (target.user) {
        fprintf(sfp, "Authorization: Basic %s\r\n",
                base64enc((unsigned char*)target.user, buf, sizeof(buf)));
}
if (use_proxy && server.user) {
        fprintf(sfp, "Proxy-Authorization: Basic %s\r\n",
                base64enc((unsigned char*)server.user, buf, sizeof(buf)));
}

Can you try strlen()?
 
(0002530)
vda
06-27-07 14:41

Hopefully fixed in rev 18955. Please test.
 

- Issue History
Date Modified Username Field Change
06-26-07 02:31 iggarpe New Issue
06-26-07 02:31 iggarpe Status new => assigned
06-26-07 02:31 iggarpe Assigned To  => BusyBox
06-26-07 03:15 iggarpe Note Added: 0002516
06-26-07 07:26 vda Note Added: 0002523
06-27-07 14:41 vda Status assigned => closed
06-27-07 14:41 vda Note Added: 0002530
06-27-07 14:41 vda Resolution open => fixed
06-28-07 13:23 jamesz Issue Monitored: jamesz
06-28-07 13:23 jamesz Issue End Monitor: jamesz


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker