It is currently Thu May 23, 2013 7:40 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Netpkg 4.7.0 :: Bad proxy implementation [PROBABLY FIXED]
PostPosted: Fri Oct 21, 2011 6:21 pm 
Regular Zenwalker
Regular Zenwalker
User avatar

Joined: Sun Jun 12, 2011 10:32 pm
Posts: 31
Location: Bahia Blanca, Argentina
Hi folks!

I was trying to configure a fresh installed Zenwalk on an old PC. After a while playing around with it, I was able to configure almost the whole system.
However, although I was able to configure the proxy server for netpkg on console, the GUI client of netpkg, xnetpkg, wasn't working.

I edited the file /etc/netpkg.conf , updated the proxy sockets, and left empty the user and pass fields, but xnetpkg wasn't connecting either.
Anyway, I found the bug... the file /usr/lib/perl5/5.12.3/i486-linux-thread-multi/ZW/Netpkg/Netpkg.pm was putting together the proxy server in a wrong way (It didn't consider the fact that someone could not fill in the user and pass fields, so it always concatenate the chars ":" and "@" at the beginning of the proxy string)
This was the original piece of code, around the line 531:
Code:
# Setup authentication details, if necessary
        if($self->{Proxy_Socket} ne '') {
                my $ProxyUrl = [b]"http://"."$self->{Proxy_User}".":"."$self->{Proxy_Password}"."@"."$self->{Proxy_Socket}";[/b]
                $Browser->proxy(['http', 'ftp'], $ProxyUrl);
        }       


I was able to fix that adding another conditional, and modifying the original one.
The modified code:
Code:
# Setup authentication details, if necessary
        if($self->{Proxy_Socket} ne '' && $self->{Proxy_User} ne '') {
                my $ProxyUrl = "http://"."$self->{Proxy_User}".":"."$self->{Proxy_Password}"."@"."$self->{Proxy_Socket}";
                $Browser->proxy(['http', 'ftp'], $ProxyUrl);
        }
        else{ if($self->{Proxy_Socket} ne '' && $self->{Proxy_User} eq '') {
                my $ProxyUrl = "http://"."$self->{Proxy_Socket}";
                $Browser->proxy(['http', 'ftp'], $ProxyUrl);
        }}

X!!

Neither I or my friend knew perl, so we just did what we could, hope it helps!
Regards!

TIAN \D/

P.D.:Sorry for any "language mistake" ;D


 Profile Send private message  
 
 Post subject: Re: Netpkg 4.7.0 :: Bad proxy implementation [PROBABLY FIXED
PostPosted: Fri Oct 21, 2011 8:23 pm 
Administrator
Administrator
User avatar

Joined: Fri Mar 10, 2006 8:52 am
Posts: 3731
Location: Nantes - France
Thank you very much :)

I will take a look

Cheers
JP


 Profile Send private message  
 
 Post subject: Re: Netpkg 4.7.0 :: Bad proxy implementation [PROBABLY FIXED
PostPosted: Fri Feb 03, 2012 8:02 pm 
Administrator
Administrator
User avatar

Joined: Fri Mar 10, 2006 8:52 am
Posts: 3731
Location: Nantes - France
fixed :)

http://www.zenwalk.org/modules/news/art ... toryid=127

Thanks
JP


 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


 Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
 
cron