[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #12190 [Pluggable transport]: Pyptlib does not join args or optargs correctly in ClientTransportPlugin.reportMethodSuccess



#12190: Pyptlib does not join args or optargs correctly in
ClientTransportPlugin.reportMethodSuccess
-------------------------------------------------+-------------------------
 Reporter:  RushingWookie                        |          Owner:  asn
     Type:  defect                               |         Status:  new
 Priority:  minor                                |      Milestone:
Component:  Pluggable transport                  |        Version:
 Keywords:  pyptlib, ClientTransportPlugin,      |  Actual Points:
  ReportMethodSuccess                            |         Points:
Parent ID:                                       |
-------------------------------------------------+-------------------------
 In ClientTransportPlugin.reportMethodSuccess, the code for joining the
 params args and optargs is wrong. The args and optargs params are defined
 as strings when they should be lists of strings.
 Current code
   {{{#!python
           if args and len(args) > 0:
             methodLine = methodLine + ' ARGS=' + args.join(',')
           if optArgs and len(optArgs) > 0:
             methodLine = methodLine + ' OPT-ARGS=' + args.join(',')
   }}}

 Fixed Code
   {{{#!python
           if args and len(args) > 0:
             methodLine = methodLine + ' ARGS=' + ','.join(args)
           if optArgs and len(optArgs) > 0:
             methodLine = methodLine + ' OPT-ARGS=' + ','.join(optArgs)
   }}}
 Also the documentation for the types of args and optArgs should be changed
 to lists.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12190>
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