From hrs@allbsd.org  Tue Mar  7 18:15:32 2006
Return-Path: <hrs@allbsd.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A8BCC16A420;
	Tue,  7 Mar 2006 18:15:32 +0000 (GMT)
	(envelope-from hrs@allbsd.org)
Received: from mail.allbsd.org (vlsi00.si.noda.tus.ac.jp [133.31.130.32])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 8B18543D6A;
	Tue,  7 Mar 2006 18:15:27 +0000 (GMT)
	(envelope-from hrs@allbsd.org)
Received: from delta.allbsd.org (p5180-ipbf304funabasi.chiba.ocn.ne.jp [125.170.156.180])
	(authenticated bits=128)
	by mail.allbsd.org (8.13.4/8.13.4) with ESMTP id k27IFB0P029955;
	Wed, 8 Mar 2006 03:15:26 +0900 (JST)
	(envelope-from hrs@allbsd.org)
Received: from alph.allbsd.org (alph.allbsd.org [192.168.0.10])
	by delta.allbsd.org (8.13.4/8.13.4) with ESMTP id k27ID2tF006977;
	Wed, 8 Mar 2006 03:13:04 +0900 (JST)
	(envelope-from hrs@alph.d.allbsd.org)
Received: from alph.allbsd.org (localhost [127.0.0.1])
	by alph.allbsd.org (8.13.4/8.13.4) with ESMTP id k27ID2Bv045254;
	Wed, 8 Mar 2006 03:13:02 +0900 (JST)
	(envelope-from hrs@alph.d.allbsd.org)
Received: (from hrs@localhost)
	by alph.allbsd.org (8.13.4/8.13.4/Submit) id k27ID1OQ045253;
	Wed, 8 Mar 2006 03:13:01 +0900 (JST)
	(envelope-from hrs)
Message-Id: <200603071813.k27ID1OQ045253@alph.allbsd.org>
Date: Wed, 8 Mar 2006 03:13:01 +0900 (JST)
From: Hiroki Sato <hrs@freebsd.org>
Reply-To: Hiroki Sato <hrs@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: cperciva@freebsd.org
Subject: portsnap does not handle HTTP_PROXY_AUTH correctly
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         94180
>Category:       bin
>Synopsis:       portsnap(8) does not handle HTTP_PROXY_AUTH correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    ume
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 07 18:20:04 GMT 2006
>Closed-Date:    Mon Nov 05 07:57:34 UTC 2012
>Last-Modified:  Mon Nov 05 07:57:34 UTC 2012
>Originator:     Hiroki Sato
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
Tokyo University of Science
>Environment:
FreeBSD spike2.allbsd.org 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Jan 23 02:16:00 JST 2006     hrs@spike2.allbsd.org:/usr/obj/usr/src/sys/SPIKE2  i386

>Description:
	portsnap uses strsep() to get username and password from
	HTTP_PROXY_AUTH, but it wrongly assumes ":" character in
	the end of the string.  This problem is reported by ume@.

>How-To-Repeat:
	N/A

>Fix:

Index: phttpget.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/portsnap/phttpget/phttpget.c,v
retrieving revision 1.8
diff -d -u -I\$OpenBSD:.*\$ -I\$FreeBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.8 phttpget.c
--- phttpget.c	27 Jan 2006 14:42:15 -0000	1.8
+++ phttpget.c	7 Mar 2006 17:47:36 -0000
@@ -152,7 +152,7 @@
 
 		/* Obtain username and password */
 		proxy_auth_user = strsep(&env_HTTP_PROXY_AUTH, ":");
-		proxy_auth_pass = strsep(&env_HTTP_PROXY_AUTH, ":");
+		proxy_auth_pass = env_HTTP_PROXY_AUTH;
 	}
 
 	if ((proxy_auth_user != NULL) && (proxy_auth_pass != NULL)) {

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->cperciva 
Responsible-Changed-By: hrs 
Responsible-Changed-When: Tue Mar 7 18:26:15 UTC 2006 
Responsible-Changed-Why:  
over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94180 
State-Changed-From-To: open->patched 
State-Changed-By: hrs 
State-Changed-When: Tue Mar 7 19:25:03 UTC 2006 
State-Changed-Why:  
Committed to -CURRENT and waiting MFC now. 


Responsible-Changed-From-To: cperciva->ume 
Responsible-Changed-By: hrs 
Responsible-Changed-When: Tue Mar 7 19:25:03 UTC 2006 
Responsible-Changed-Why:  
Over to the originator who also have handled this patch actually. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94180 
State-Changed-From-To: patched->closed 
State-Changed-By: ume 
State-Changed-When: Mon Nov 5 07:56:40 UTC 2012 
State-Changed-Why:  
It was already fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=94180 
>Unformatted:
