# HG changeset patch # User Goffi # Date 1443550783 -7200 # Node ID 98f92a054539e893d2d71438a97944a5874b97f6 # Parent 55967cf161b10f8d4b20540c17929109b5f6a730 plugins: lowered security limits for non dangerous actions. A reference documentation is in progress to choose values: http://wiki.goffi.org/wiki/Security_Limits/en diff -r 55967cf161b1 -r 98f92a054539 src/plugins/plugin_xep_0050.py --- a/src/plugins/plugin_xep_0050.py Tue Sep 29 19:07:32 2015 +0200 +++ b/src/plugins/plugin_xep_0050.py Tue Sep 29 20:19:43 2015 +0200 @@ -219,7 +219,7 @@ method=self._requestCommandsList, async=True) self.__requesting_id = host.registerCallback(self._requestingEntity, with_data=True) - host.importMenu((D_("Service"), D_("commands")), self._commandsMenu, security_limit=4, help_string=D_("Execute ad-hoc commands")) + host.importMenu((D_("Service"), D_("commands")), self._commandsMenu, security_limit=2, help_string=D_("Execute ad-hoc commands")) def getHandler(self, profile): return XEP_0050_handler(self) @@ -401,7 +401,7 @@ form_ui.addText(_("Please enter target jid"), 'instructions') form_ui.changeContainer("pairs") form_ui.addLabel("jid") - jid = form_ui.addString("jid", value=self.host.getClient(profile).jid.host) + form_ui.addString("jid", value=self.host.getClient(profile).jid.host) return {'xmlui': form_ui.toXml()} def _statusCallback(self, command_elt, session_data, action, node, profile): diff -r 55967cf161b1 -r 98f92a054539 src/plugins/plugin_xep_0100.py --- a/src/plugins/plugin_xep_0100.py Tue Sep 29 19:07:32 2015 +0200 +++ b/src/plugins/plugin_xep_0100.py Tue Sep 29 20:19:43 2015 +0200 @@ -63,7 +63,7 @@ host.bridge.addMethod("gatewayRegister", ".plugin", in_sign='ss', out_sign='s', method=self._gatewayRegister) self.__menu_id = host.registerCallback(self._gatewaysMenu, with_data=True) self.__selected_id = host.registerCallback(self._gatewaySelectedCb, with_data=True) - host.importMenu((D_("Service"), D_("gateways")), self._gatewaysMenu, security_limit=2, help_string=D_("Find gateways")) + host.importMenu((D_("Service"), D_("gateways")), self._gatewaysMenu, security_limit=1, help_string=D_("Find gateways")) def _gatewaysMenu(self, data, profile): """ XMLUI activated by menu: return Gateways UI