Re: [tor-bugs] #26112 [Core Tor/Stem]: Stem should not use human-readable message of GETCONF 552 response

2018-08-04 Thread Tor Bug Tracker & Wiki
#26112: Stem should not use human-readable message of GETCONF 552 response
-+-
 Reporter:  dmr  |  Owner:  atagar
 Type:  defect   | Status:  closed
 Priority:  Low  |  Milestone:
Component:  Core Tor/Stem|Version:
 Severity:  Minor| Resolution:  invalid
 Keywords:  controller easy  |  Actual Points:
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by atagar):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 If Tor doesn't want us to parse exception messages then it needs to
 provide unique error codes for its different errors. Resolving in favor
 of...

 https://trac.torproject.org/projects/tor/ticket/27034#comment:4

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #26112 [Core Tor/Stem]: Stem should not use human-readable message of GETCONF 552 response

2018-05-28 Thread Tor Bug Tracker & Wiki
#26112: Stem should not use human-readable message of GETCONF 552 response
-+
 Reporter:  dmr  |  Owner:  atagar
 Type:  defect   | Status:  new
 Priority:  Low  |  Milestone:
Component:  Core Tor/Stem|Version:
 Severity:  Minor| Resolution:
 Keywords:  controller easy  |  Actual Points:
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+
Changes (by dmr):

 * keywords:  controller, easy => controller easy


Comment:

 For stem, keywords are conventionally separated by a space (` `) only, no
 comma (`,`).

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #26112 [Core Tor/Stem]: Stem should not use human-readable message of GETCONF 552 response

2018-05-18 Thread Tor Bug Tracker & Wiki
#26112: Stem should not use human-readable message of GETCONF 552 response
--+
 Reporter:  dmr   |  Owner:  atagar
 Type:  defect| Status:  new
 Priority:  Low   |  Milestone:
Component:  Core Tor/Stem |Version:
 Severity:  Minor | Resolution:
 Keywords:  controller, easy  |  Actual Points:
Parent ID:| Points:
 Reviewer:|Sponsor:
--+
Changes (by dmr):

 * keywords:  control, easy => controller, easy


Comment:

 Slight change to the keyword.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #26112 [Core Tor/Stem]: Stem should not use human-readable message of GETCONF 552 response

2018-05-15 Thread Tor Bug Tracker & Wiki
#26112: Stem should not use human-readable message of GETCONF 552 response
---+
 Reporter:  dmr|  Owner:  atagar
 Type:  defect | Status:  new
 Priority:  Low|  Milestone:
Component:  Core Tor/Stem  |Version:
 Severity:  Minor  | Resolution:
 Keywords:  control, easy  |  Actual Points:
Parent ID: | Points:
 Reviewer: |Sponsor:
---+

Comment (by atagar):

 Hi dmr. If tor changed its message format then the result for Stem users
 is that stem.InvalidArguments exceptions become stem.ProtocolError
 instead.

 If there's a unique 5xx status for 'that config option doesn't exist' then
 great. If not then the message is the only game in town for
 differentiating errors.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #26112 [Core Tor/Stem]: Stem should not use human-readable message of GETCONF 552 response

2018-05-15 Thread Tor Bug Tracker & Wiki
#26112: Stem should not use human-readable message of GETCONF 552 response
---+
 Reporter:  dmr|  Owner:  atagar
 Type:  defect | Status:  new
 Priority:  Low|  Milestone:
Component:  Core Tor/Stem  |Version:
 Severity:  Minor  | Resolution:
 Keywords:  control, easy  |  Actual Points:
Parent ID: | Points:
 Reviewer: |Sponsor:
---+

Comment (by dmr):

  Related ticket(s)
 See also tor-spec ticket #26113 which serves to reduce the ambiguity in
 the spec about whether a human-readable message is specified.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

[tor-bugs] #26112 [Core Tor/Stem]: Stem should not use human-readable message of GETCONF 552 response

2018-05-15 Thread Tor Bug Tracker & Wiki
#26112: Stem should not use human-readable message of GETCONF 552 response
---+---
 Reporter:  dmr|  Owner:  atagar
 Type:  defect | Status:  new
 Priority:  Low|  Milestone:
Component:  Core Tor/Stem  |Version:
 Severity:  Minor  |   Keywords:  control, easy
Actual Points: |  Parent ID:
   Points: |   Reviewer:
  Sponsor: |
---+---
 Both `tor` and `stem` use a message format for `GETCONF` `552` errors that
 differs from [[https://gitweb.torproject.org/torspec.git/tree/control-
 spec.txt?id=436d08b49fb84aa62d7bc96013002a0c27534bbb#n307|the wording of
 the control spec's `GETCONF` response]].

 `GETCONF` output via `tor-prompt`:
 {{{
 >>> GETCONF blah
 552 Unrecognized configuration key "blah"
 }}}

 Stem //expects// this format; see
 
[[https://gitweb.torproject.org/stem.git/tree/stem/response/getconf.py?id=aa692e62bfda5be8b87e463c3c899cb13968d32a#n33|`GetConfResponse`]]:
 {{{
 #!python
   unrecognized_keywords = []
   for code, _, line in self.content():
 if code == '552' and line.startswith('Unrecognized configuration
 key "') and line.endswith('"'):
   unrecognized_keywords.append(line[32:-1])

   if unrecognized_keywords:
 raise stem.InvalidArguments('552', 'GETCONF request contained
 unrecognized keywords: %s' % ', '.join(unrecognized_keywords),
 unrecognized_keywords)
   else:
 raise stem.ProtocolError('GETCONF response contained a non-OK
 status code:\n%s' % self)
 }}}

 My `tor` version, for reference:
 {{{
 >>> GETINFO version
 250-version=0.3.2.10 (git-0edaa32732ec8930)
 250 OK
 }}}

  Historical note
 In searching (for potential duplicates) to file this ticket, I happened
 upon the original ticket: #6114

  Priority, Severity
 I'm marking this as low,minor because it appears the code will work
 decently well (still raise //an// exception) if the message format
 changes.

  Expected behavior
 In discussion over `#tor-dev`, it was agreed that `stem` (and generally
 any controller) shouldn't rely on a specific message. Only the numeric
 code `552` should be relied upon.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs