mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Only allow numeric ids.
This commit is contained in:
parent
9efe550b52
commit
029218b56e
@ -203,6 +203,10 @@ class Http(callbacks.Privmsg):
|
|||||||
"""
|
"""
|
||||||
id = privmsgs.getArgs(args, required=0, optional=1)
|
id = privmsgs.getArgs(args, required=0, optional=1)
|
||||||
if id:
|
if id:
|
||||||
|
try:
|
||||||
|
id = int(id)
|
||||||
|
except ValueError:
|
||||||
|
irc.error('Invalid id: %s' % id, Raise=True)
|
||||||
id = 'quote=%s' % id
|
id = 'quote=%s' % id
|
||||||
else:
|
else:
|
||||||
id = 'random'
|
id = 'random'
|
||||||
|
Loading…
Reference in New Issue
Block a user