Mercurial > libervia-backend
comparison src/plugins/plugin_xep_0065.py @ 641:49587e170f53
core: added the security_limit to setParam
- params with a security greater than security_limit can not be modified
- special value: security_limit < 0 disable the check (all params can be modified)
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 07 Sep 2013 02:03:17 +0200 |
parents | 6821fc06a324 |
children | 4f747d7fde8c |
comparison
equal
deleted
inserted
replaced
640:8211b462af6b | 641:49587e170f53 |
---|---|
796 warning(_("No streamhost found in stream query")) | 796 warning(_("No streamhost found in stream query")) |
797 return | 797 return |
798 if len(streamhost_elts) != 1: | 798 if len(streamhost_elts) != 1: |
799 warning(_("Multiple streamhost elements in proxy not managed, keeping only the first one")) | 799 warning(_("Multiple streamhost elements in proxy not managed, keeping only the first one")) |
800 streamhost_elt = streamhost_elts[0] | 800 streamhost_elt = streamhost_elts[0] |
801 proxy = self.host.memory.setParam("Proxy", streamhost_elt.getAttribute("jid", ""), "File Transfer", self.parent.profile) | 801 proxy = self.host.memory.setParam("Proxy", streamhost_elt.getAttribute("jid", ""), |
802 proxy = self.host.memory.setParam("Proxy host", streamhost_elt.getAttribute("host", ""), "File Transfer", self.parent.profile) | 802 "File Transfer", profile_key=self.parent.profile) |
803 proxy = self.host.memory.setParam("Proxy port", streamhost_elt.getAttribute("port", ""), "File Transfer", self.parent.profile) | 803 proxy = self.host.memory.setParam("Proxy host", streamhost_elt.getAttribute("host", ""), |
804 "File Transfer", profile_key=self.parent.profile) | |
805 proxy = self.host.memory.setParam("Proxy port", streamhost_elt.getAttribute("port", ""), | |
806 "File Transfer", profile_key=self.parent.profile) | |
804 | 807 |
805 def connectionInitialized(self): | 808 def connectionInitialized(self): |
806 def after_init(ignore): | 809 def after_init(ignore): |
807 proxy_ent = self.host.memory.getServerServiceEntity("proxy", "bytestreams", self.parent.profile) | 810 proxy_ent = self.host.memory.getServerServiceEntity("proxy", "bytestreams", self.parent.profile) |
808 if not proxy_ent: | 811 if not proxy_ent: |