Opened 5 years ago

Closed 5 years ago

#11269 closed defect (fixed)

Misplaced comma in scramblesuit.py

Reported by: yawning Owned by: asn
Priority: Very Low Milestone:
Component: Archived/Obfsproxy Version:
Severity: Keywords: scramblesuit
Cc: phw Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

A misplaced comma in a raise statement causes a ValuError instead of a helpful message to the user.

Reported on #tor by picuntu-ul.

Since it's totally trivial, I'll inline the fix as well:

diff --git a/obfsproxy/transports/scramblesuit/scramblesuit.py b/obfsproxy/transports/scramblesuit/scramblesuit.py
index 9262b34..bff0069 100644
--- a/obfsproxy/transports/scramblesuit/scramblesuit.py
+++ b/obfsproxy/transports/scramblesuit/scramblesuit.py
@@ -551,7 +551,7 @@ class ScrambleSuitTransport( base.BaseTransport ):
             rawLength = len(uniformDHSecret)
             if rawLength != const.SHARED_SECRET_LENGTH:
                 raise base.PluggableTransportError(
-                    "The UniformDH password must be %d bytes in length, ",
+                    "The UniformDH password must be %d bytes in length, "
                     "but %d bytes are given."
                     % (const.SHARED_SECRET_LENGTH, rawLength))
             else:

Child Tickets

Change History (2)

comment:1 Changed 5 years ago by yawning

Status: newneeds_review

comment:2 Changed 5 years ago by phw

Resolution: fixed
Status: needs_reviewclosed

Thanks. Fixed in my ScrambleSuit user repository. Will be in obfsproxy as soon as #11271 is fixed.

Note: See TracTickets for help on using tickets.