projects
/
irker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94012cb
)
Reject input that doesn't parse to a dict.
author
Eric S. Raymond
<esr@thyrsus.com>
Sun, 30 Sep 2012 01:59:09 +0000
(21:59 -0400)
committer
Eric S. Raymond
<esr@thyrsus.com>
Sun, 30 Sep 2012 01:59:09 +0000
(21:59 -0400)
irkerd
patch
|
blob
|
history
diff --git
a/irkerd
b/irkerd
index d249fca52de88af755d203be9507569c89f96a96..bdcd54e3a50d56a519824327e6c1b8bbb1365f0b 100755
(executable)
--- a/
irkerd
+++ b/
irkerd
@@
-314,7
+314,9
@@
class Irker:
"Perform a JSON relay request."
try:
request = json.loads(line.strip())
- if "to" not in request or "privmsg" not in request:
+ if type(request) != type({}):
+ self.logerr("request in tot a JSON dictionary: %s" % repr(request))
+ elif "to" not in request or "privmsg" not in request:
self.logerr("malformed reqest - 'to' or 'privmsg' missing: %s" % repr(request))
else:
channels = request['to']