Bug 831743 - bad Socks5Error exception
Summary: bad Socks5Error exception
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-SocksiPy
Version: 17
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mykola Ulianytskyi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-13 16:58 UTC by Fl@sh
Modified: 2013-07-04 06:51 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-07-04 06:51:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Fl@sh 2012-06-13 16:58:15 UTC
Description of problem:


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
str.235 - 238 (in socksocket.__negotiatesocks5()):

			if ord(resp[1])<=8:
				raise Socks5Error((ord(resp[1]),_generalerrors[ord(resp[1])]))
			else:
				raise Socks5Error((9,_generalerrors[9]))

Comment 1 Fl@sh 2012-07-14 11:05:22 UTC
Reproduce this error is difficult, so just fix the code in these lines of the module.

Comment 2 Fl@sh 2012-07-19 14:35:21 UTC
there is I found this error (AttributeError):

--- ./socks.py  2006-10-26 00:19:26.000000000 +0400
+++ /home/Flash/socks.py        2012-07-19 18:28:56.962041373 +0400
@@ -233,9 +233,9 @@
                        # Connection failed
                        self.close()
                        if ord(resp[1])<=8:
-                               raise Socks5Error(ord(resp[1]),_generalerrors[ord(resp[1])])
+                               raise Socks5Error((ord(resp[1]),_generalerrors[ord(resp[1])]))
                        else:
-                               raise Socks5Error(9,_generalerrors[9])
+                               raise Socks5Error((9,_generalerrors[9]))
                # Get the bound address/port
                elif resp[3] == "\x01":
                        boundaddr = self.__recvall(4)

Comment 3 Felix Schwarz 2012-07-30 07:39:57 UTC
just some comments from a random bugzilla user:
 - personally I prefer patches attached as plain text files to avoid problems with line breaks (good that you added a unified diff though)
 - even if the problem is hard to reproduce, a traceback is usually helpful (please remove lines specific to your application).
 - your changes look ok at a first glance as the Socks5Error class only takes on argument in its constructor
 - one thing that I don't understand is why you see an AttributeError. I'd expect a TypeError assuming that my analysis above is correct.

I can't give you hope that the original maintainer might as answer if you add the detail request above. However it would certainly improve the usefulness of your bug report.

Comment 4 Fl@sh 2012-09-03 17:50:12 UTC
Thanks for recomendations.
But maintainer not answers since. Perhaps this package to pass another maintainer.

Comment 5 Fl@sh 2013-02-06 14:01:06 UTC
Is it very difficult to fix two pair of "( )" since?
It need the new maintainer...

Comment 6 Fl@sh 2013-02-09 09:01:09 UTC
 proposed above patch is not quite correct. needs to be updated.
 For example: https://github.com/mikedougherty/SocksiPy/blob/master/socks.py

Comment 7 Fedora End Of Life 2013-07-04 00:06:53 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Fl@sh 2013-07-04 06:51:09 UTC
version updated to 1.00 at F19


Note You need to log in before you can comment on or make changes to this bug.