[tor-bugs] #13370 [Pluggable transport]: goptlib double-escapes with backslashes

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 8 22:38:27 UTC 2014


#13370: goptlib double-escapes with backslashes
---------------------------------+---------------------
 Reporter:  dcf                  |          Owner:  asn
     Type:  defect               |         Status:  new
 Priority:  normal               |      Milestone:
Component:  Pluggable transport  |        Version:
 Keywords:  goptlib              |  Actual Points:
Parent ID:                       |         Points:
---------------------------------+---------------------
 The [https://gitweb.torproject.org/pluggable-
 transports/goptlib.git/blob/refs/tags/0.2:/pt.go#l205 escape function] is
 meant to prevent problematic bytes (specifically \x00 and \x0a) from being
 emitted in a PT→Tor output line. Because, according to
 [https://gitweb.torproject.org/torspec.git/blob/c6c7404547e0e431232dd1674ff11023a2d6f6bf
 :/pt-spec.txt#l362 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
 [https://gitweb.torproject.org/torspec.git/blob/c6c7404547e0e431232dd1674ff11023a2d6f6bf
 :/pt-spec.txt#l443 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.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13370>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list