[saydo] saydo matches too leniently, causing errors

Bug #499450 reported by Jonathan Hitchcock
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ibid
Fix Released
Low
Jonathan Hitchcock

Bug Description

2009-12-21 21:26:23,261 DEBUG source.atrum: Received message from Vhata in Spinach: do you care for sodomy?
2009-12-21 21:26:23,261 DEBUG core.dispatcher: Received event from atrum source
2009-12-21 21:26:23,269 DEBUG core.auth: Checking saydo permission for 1/1 (Vhata!<email address hidden>) from cache: auth
2009-12-21 21:26:23,612 DEBUG source.atrum: Authentication result for Vhata: True
2009-12-21 21:26:23,677 INFO core.auth: Authenticated 1/1 (Vhata!<email address hidden>) using nickserv
2009-12-21 21:26:23,701 ERROR core.dispatcher: Exception occured in Log processor of log plugin.
Event: {'account': 1L, 'responses': [{'action': True, 'reply': u'care for sodomy?', 'address': False, 'target': u'you', 'source': None}], 'source': u'atrum', 'addressed': True, 'session': <sqlalchemy.orm.session.Sess object at 0xb788f3ac>, 'processed': True, 'time': dat
etime.datetime(2009, 12, 21, 19, 26, 23, 262508), 'identity': 1L, 'message': {'raw': u'do you care for sodomy?', 'deaddressed': u'do you care for sodomy?', 'clean': u'do you care for sodomy', 'stripped': u'do you care for sodomy'}, 'type': u'message', 'public': False, '
channel': u'Vhata!<email address hidden>', 'sender': {'nick': u'Vhata', 'connection': u'Vhata!<email address hidden>', 'id': u'Vhata'}}
Traceback (most recent call last):
  File "/home/spinach/ibid/ibid/core.py", line 26, in _process
    processor.process(event)
  File "/home/spinach/ibid/ibid/plugins/log.py", line 130, in process
    self.log_event(e) File "/home/spinach/ibid/ibid/plugins/log.py", line 105, in log_event file = self.get_logfile(event)
  File "/home/spinach/ibid/ibid/plugins/log.py", line 49, in get_logfile
    channel = ibid.sources[event.source].logging_name(event.channel)
  File "/home/spinach/ibid/ibid/__init__.py", line 17, in __getitem__
    return dict.__getitem__(self, key.lower())
AttributeError: 'NoneType' object has no attribute 'lower'
2009-12-21 21:26:23,701 DEBUG core.dispatcher: {'account': 1L, 'responses': [{'action': True, 'reply': u'care for sodomy?', 'address': False, 'target': u'you', 'source': None}], 'complain': u'exception', 'source': u'atrum', 'addressed': True, 'processed': True, 'time':
datetime.datetime(2009, 12, 21, 19, 26, 23, 262508), 'identity': 1L, 'message': {'raw': u'do you care for sodomy?', 'deaddressed': u'do you care for sodomy?', 'clean': u'do you care for sodomy', 'stripped': u'do you care for sodomy'}, 'type': u'message', 'public': False, 'channel': u'Vhata!<email address hidden>', 'sender': {'nick': u'Vhata', 'connection': u'Vhata!<email address hidden>', 'id': u'Vhata'}}

"do you care for sodomy?" appears to be being interpreted as "do [in] you [on source None] care for sodomy?"

Adminny commands like saydo don't need to be as lenient matching: they can require strict syntax so they don't get in the way of normal stuff.

Related branches

Changed in ibid:
assignee: nobody → Jonathan Hitchcock (vhata)
importance: Undecided → Low
milestone: none → 0.1
status: New → In Progress
Changed in ibid:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.