Opened 6 years ago

Closed 6 years ago

#13370 closed defect (fixed)

goptlib double-escapes with backslashes

Reported by: dcf Owned by: asn
Priority: Medium Milestone:
Component: Circumvention/Pluggable transport Version:
Severity: Keywords: goptlib
Cc: yawning Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The escape function is meant to prevent problematic bytes (specifically \x00 and \x0a) from being emitted in a PT→Tor output line. Because, according to pt-spec.txt,

<ArgChar> ::= <any US-ASCII character but NUL or NL>

However, the way the function does escaping (prepending with backslashes) conflicts with the established use of backslash to escape SMETHOD ARGS. As noted in comment:1:ticket:12930, any string that needs escaping in SMETHOD args, like a base64 string that ends with '=', is getting double-escaped.

Child Tickets

Change History (2)

comment:1 Changed 6 years ago by yawning

Cc: yawning added

comment:2 Changed 6 years ago by dcf

Resolution: fixed
Status: newclosed

I changed the code to panic instead of escape in 5791268c.

I made a tag 0.3 in case you need this version in a browser bundle.

Note: See TracTickets for help on using tickets.