pluggable transport specs need to be more consistent about quoting
There's some inconsistency among the specs (and code doesn't necessarily match the specs either) about how pluggable transports quote or escape special characters in transport arguments. See #12930 (moved) for additional background.
Proposal:
- Explicitly disallow whitespace (or control characters for that matter) in keys or values of PT arguments. (No PT does this now that I know of, and people with Unix-ish backgrounds are likely to avoid using whitespace in this context anyway.)
- Explicitly disallow
=
and\
in keys of PT arguments. (I'm assuming PT designers have more flexibility in choosing keys than value encodings, but if this poses a problem for someone please speak up.) - Allow but discourage
=
in values of PT arguments. (If you encode something in base64 or base32, try to truncate the trailing padding.) - Allow but discourage
\
in values of PT arguments. - Require
\
to be escaped by\
(in addition to escaping,
, which is already required) inSMETHOD ARGS
andtransport
lines ofextra-info
documents. (Almost everywhere else I've seen that uses\
for escaping also requires that\
itself be escaped, and it's closer to what people already expect. goptlib already implemented this despite it not being specified inpt-spec.txt
) - Do not require
=
to be escaped by\
inSMETHOD ARGS
andtransport
lines ofextra-info
documents. - Do not require any PT argument characters to be escaped in BridgeDB output or
Bridge
lines intorrc
. (Any\
characters stand for themselves. This requires the fewest changes to existingtor
code.)