Opened 4 years ago

Closed 4 years ago

#17942 closed defect (fixed)

stem-1.4.1 doesn't like double-space in exit policy

Reported by: toralf Owned by: atagar
Priority: Medium Milestone:
Component: Core Tor/Stem Version:
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

ExitPolicy reject  *:*

gives

    policy = controller.get_exit_policy()
  File "/usr/lib64/python3.4/site-packages/stem/control.py", line 414, in wrapped
    raise exc
  File "/usr/lib64/python3.4/site-packages/stem/control.py", line 409, in wrapped
    return func(self, *args, **kwargs)
  File "/usr/lib64/python3.4/site-packages/stem/control.py", line 1177, in get_exit_policy
    config_policy = stem.exit_policy.get_config_policy(policy, self.get_info('address', None))
  File "/usr/lib64/python3.4/site-packages/stem/exit_policy.py", line 154, in get_config_policy
    result.append(ExitPolicyRule(rule))
  File "/usr/lib64/python3.4/site-packages/stem/exit_policy.py", line 655, in __init__
    raise ValueError('An exit policy should have a space separating its accept/reject from the exit pattern: %s' % rule)
ValueError: An exit policy should have a space separating its accept/reject from the exit pattern: reject  *:

Child Tickets

Change History (1)

comment:1 Changed 4 years ago by atagar

Resolution: fixed
Status: newclosed

Thanks toralf! From our tests seems this was intentional but probably a case where we're being too picky. If tor allows them then we probably should as well. Changed...

https://gitweb.torproject.org/stem.git/commit/?id=f7c96a68d0eac8e171f835a75fbe24e989c0e301

Note: See TracTickets for help on using tickets.