mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
If an invalid password is specified *and* the hostmask isn't recognized we
need to watch for a KeyError instead of assuming it is the owner trying to register a hostmask for another user.
This commit is contained in:
parent
32f39e0980
commit
06e92cdcb2
@ -222,7 +222,11 @@ class User(callbacks.Privmsg):
|
||||
pass
|
||||
if not user.checkPassword(password) and \
|
||||
not user.checkHostmask(msg.prefix):
|
||||
try:
|
||||
u = ircdb.users.getUser(msg.prefix)
|
||||
except KeyError:
|
||||
irc.error(conf.supybot.replies.incorrectAuthentication())
|
||||
return
|
||||
if not u.checkCapability('owner'):
|
||||
irc.error(conf.supybot.replies.incorrectAuthentication())
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user