From eda88a59a6b56c70fcbc9e2f5ef705a17d74c381 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sat, 9 May 2020 23:14:26 +0200 Subject: [PATCH] Add back the deny_anonymous decorator to /add and /accept --- poezio/core/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/poezio/core/commands.py b/poezio/core/commands.py index b00cf24a..f5594d5d 100644 --- a/poezio/core/commands.py +++ b/poezio/core/commands.py @@ -17,11 +17,12 @@ from slixmpp.xmlstream.matcher import StanzaPath from poezio import common from poezio import pep from poezio import tabs +from poezio import multiuserchat as muc from poezio.bookmarks import Bookmark from poezio.common import safeJID from poezio.config import config, DEFAULT_CONFIG, options as config_opts -from poezio import multiuserchat as muc from poezio.contact import Contact, Resource +from poezio.decorators import deny_anonymous from poezio.plugin import PluginConfig from poezio.roster import roster from poezio.theming import dump_tuple, get_theme @@ -517,6 +518,7 @@ class CommandCore: else: self.core.information('No bookmark to remove', 'Info') + @deny_anonymous @command_args_parser.quoted(0, 1) def command_accept(self, args): """ @@ -553,6 +555,7 @@ class CommandCore: pto=jid, ptype='subscribe', pnick=self.core.own_nick) self.core.information('%s is now authorized' % jid, 'Roster') + @deny_anonymous @command_args_parser.quoted(1) def command_add(self, args): """