Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 650520

Summary: When proxy password has a '#' character, yum doesn't work
Product: Red Hat Enterprise Linux 5 Reporter: Marcelo Moreira de Mello <mmello>
Component: yum-rhn-pluginAssignee: Michael Mráka <mmraka>
Status: CLOSED ERRATA QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: high    
Version: 5.5CC: jhutar, jlau, jwest, mmello, mmraka, pnovotny
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: rhn-client-tools-0.4.20-46.el5 Doc Type: Bug Fix
Doc Text:
Previously, using the hash sign (that is, "#") in a proxy password caused yum to fail with the following error: Error communicating with server. The message was: Proxy Authentication Required With this update, this error no longer occurs, and the use of this character no longer prevents yum from working.
Story Points: ---
Clone Of:
: 732209 (view as bug list) Environment:
Last Closed: 2011-01-14 00:11:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 732209    
Attachments:
Description Flags
Squid configuration file. none

Description Marcelo Moreira de Mello 2010-11-06 21:00:46 UTC
Description of problem:
When proxy password has a '#' character, yum doesn't work and give the error below

Version-Release number of selected component (if applicable):
RHEL5.5

How reproducible:
100%

Steps to Reproduce:
1) edit yum.conf as below
proxy=http://localhost:3128
proxy_username=proxy_user
proxy_password=#proxy_pas#sword

2)Up2date file is placed on /etc/sysconfig/rhn/up2date
with following setting:

enableProxy=1
httpProxy=localhost:3128
enableProxyAuth=1
proxyUser=proxy_user
proxyPassword=#proxy_pas#sword


[root@server ~]# yum install x3270-x11
Loading "rhnplugin" plugin
Loading "security" plugin
Running "config" handler for "security" plugin
Config time: 0.082
Running "init" handler for "rhnplugin" plugin
D: login(forceUpdate=False) invoked
D: readCachedLogin invoked
D: Checking pickled loginInfo, currentTime= 1288690735.86 , createTime= 1288688656.85 , expire-offset= 3600.0
D: readCachedLogin(): using pickled loginInfo set to expire at  1288692256.85
A protocol error occurred: Proxy Authentication Required , attempt #1,
A protocol error occurred: Proxy Authentication Required , attempt #2,
A protocol error occurred: Proxy Authentication Required , attempt #3,
A protocol error occurred: Proxy Authentication Required , attempt #4,
A protocol error occurred: Proxy Authentication Required , attempt #5,
Error communicating with server. The message was:
Proxy Authentication Required
There was an error communicating with RHN.
RHN channel support will be disabled.
Error communicating with server. The message was:
Proxy Authentication Required
Yum Version: 3.2.22
COMMAND: yum install x3270-x11 
Installroot: /
Ext Commands:

   x3270-x11
Setting up Package Sacks
Reading Local RPMDB
rpmdb time: 0.000
Setting up Install Process
Setting up Package Sacks
Checking for virtual provide or file-provide for x3270-x11
Searching pkgSack for dep: x3270-x11
Setting up Package Sacks
No package x3270-x11 available.
Setting up Package Sacks
Nothing to do

Actual results:
Yum error. 

Expected results:
Yum works properly

Comment 3 seth vidal 2010-11-08 14:25:45 UTC
what ver of python-iniparse do you have installed?

Comment 4 Marcelo Moreira de Mello 2010-11-08 14:40:02 UTC
Hello Seth, 

python-iniparse-0.2.3-4.el5-noarch

Best, 
mmm

Comment 6 seth vidal 2010-11-08 15:52:00 UTC
I just did a simple test and it doesn't look like it is iniparse.

Here's a simple test.

make a file named test.ini:

[test]
name=user
password=#this#password


then run python and do:

import iniparse
c = iniparse.ConfigParser()
c.read('test.ini')
c.get('test', 'password')

you should get back the complete string.

so the next piece to check is urlgrabber in rhel5, which, ultimately, is going to be urllib[2] in python.

Comment 8 seth vidal 2010-11-08 17:26:48 UTC
Marcelo,
i'll see if I can figure out a nice way to test this.

thanks

Comment 15 Michael Mráka 2010-11-10 09:37:57 UTC
Fixed in spacewalk git by
commit dd1b01cb1067d165f902cd7c72f9cc6a25993f98
    650520 - allow # in password

Comment 16 Michael Mráka 2010-11-10 10:13:30 UTC
Fixed in rhel5 branch
Sending        rhn-client-tools/src/up2date_client/config.py
Transmitting file data .
Committed revision 197656.

Comment 18 Marcelo Moreira de Mello 2010-11-10 12:25:42 UTC
Hello team, 

Fix worked fine. 

Thank you.

Comment 24 Pavel Novotny 2010-11-22 10:04:14 UTC
Created attachment 461959 [details]
Squid configuration file.

Comment 25 Pavel Novotny 2010-11-22 10:05:55 UTC
Verified.

Package versions:
rhn-client-tools-0.4.20-46.el5
yum-rhn-plugin-0.5.4-17.el5

Proxy: 
squid-2.6.STABLE21-6.el5
user: proxy_user
pass: #proxy_pas#sword
/etc/squid/squid.conf is in attachment #461959 [details].

Configuration files /etc/yum.conf and /etc/sysconfig/rhn/up2date modified as written in comment #1.

Commands like yum install <package> and rhnreg_ks are working correctly, no proxy authentication error occured.

Comment 27 Jaromir Hradilek 2010-11-30 12:34:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, using the hash sign (that is, "#") in a proxy password caused yum to fail with the following error:

  Error communicating with server. The message was:
  Proxy Authentication Required

With this update, this error no longer occurs, and the use of this character no longer prevents yum from working.

Comment 29 errata-xmlrpc 2011-01-14 00:11:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-0112.html

Comment 30 Jan Hutař 2011-11-03 09:16:56 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1,6 +1 @@
-Previously, using the hash sign (that is, "#") in a proxy password caused yum to fail with the following error:
+Previously, using the hash sign (that is, "#") in a proxy password caused yum to fail with the following error:

  Error communicating with server. The message was:
  Proxy Authentication Required

With this update, this error no longer occurs, and the use of this character no longer prevents yum from working.-
-  Error communicating with server. The message was:
-  Proxy Authentication Required
-
-With this update, this error no longer occurs, and the use of this character no longer prevents yum from working.