[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #9976 [Flashproxy]: flashproxy-client needs to pass args to reg-methods
#9976: flashproxy-client needs to pass args to reg-methods
----------------------------+-----------------
Reporter: infinity0 | Owner: dcf
Type: defect | Status: new
Priority: normal | Milestone:
Component: Flashproxy | Version:
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
----------------------------+-----------------
Comment (by dcf):
Replying to [comment:2 infinity0]:
> I'm ok with the single-command line idea, but it could potentially lead
to even worse double-escaping :p (or even worse, non-functionality,
depending on whether Tor parses the ClientTransportPlugin line
coherently).
>
> We can use http://docs.python.org/2/library/shlex.html to split the
line. Implementation-wise it would be simpler to use python's `%()s`
syntax, so then we'd get something like:
I agree that shlex is clearly the right way to parse options representing
a command line.
> {{{
> flashproxy-client --register-command='reg-twitter --extra-twitter-
specific-flags %(fp_options) %(address)'
> }}}
>
> If feasible, I'd prefer to keep things simple and keep all the
potentially-inheritable options in a single %(fp_options) variable. If the
reg-method gets non-sensical options (e.g. facilitator URL for reg-email)
it should just ignore them. (We could move this code to the common
library, so anything written in python can do this with ease.)
That's an interesting idea, to have registration helpers ignore options
that are not meant for them. I think it's quite reasonable, at least, to
force all registration helpers into a common command-line option rubric,
so that we don't have to worry about cases like a program accepting `--my-
transport` instead of `--transport` or something like that.
> Some more possibilities:
>
> * automatically append "%(fp_options) %(address)" to any command string
that doesn't have a % character.
> * automatically convert "xxx yyy zzz" to "flashproxy-reg-xxx yyy zzz" if
"xxx" doesn't exist on the PATH.
These two options seem more magical than I like, but we can talk about it.
The first one sounds better, and not likely to surprise anyone, though
potentially unnecessary. The second one, I don't know, it's not like
people are typing those torrc lines so much that we need to abbreviate.
("Explicit is better than implicit"?) It would allow someone who can
create programs in your PATH to hijack your exec, by creating a file
called `flashproxy-reg-`''xxx''. May be even easier if ''xxx'' contains a
slash.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9976#comment:3>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs