plugin extra_pep, params: fixed insecure building of jids_list
This commit is contained in:
parent
ab7ae07a83
commit
77c3e83ec8
1 changed files with 19 additions and 2 deletions
|
|
@ -20,6 +20,8 @@
|
|||
from sat.core.i18n import _, D_
|
||||
from sat.core.log import getLogger
|
||||
log = getLogger(__name__)
|
||||
from sat.memory import params
|
||||
from twisted.words.protocols.jabber import jid
|
||||
|
||||
|
||||
PLUGIN_INFO = {
|
||||
|
|
@ -34,9 +36,11 @@ PLUGIN_INFO = {
|
|||
"description": _(u"""Display messages from extra PEP services""")
|
||||
}
|
||||
|
||||
|
||||
PARAM_KEY = u"Misc"
|
||||
PARAM_NAME = u"Blog authors following list"
|
||||
PARAM_DEFAULT = ["salut-a-toi@libervia.org"]
|
||||
PARAM_DEFAULT = (jid.JID("salut-a-toi@libervia.org"),)
|
||||
|
||||
|
||||
class ExtraPEP(object):
|
||||
|
||||
|
|
@ -55,7 +59,7 @@ class ExtraPEP(object):
|
|||
'category_label': D_(PARAM_KEY),
|
||||
'param_name': PARAM_NAME,
|
||||
'param_label': D_(PARAM_NAME),
|
||||
'jids': "".join(["<jid>%s</jid>" % jid for jid in PARAM_DEFAULT])
|
||||
'jids': u"\n".join({elt.toXml() for elt in params.createJidElts(PARAM_DEFAULT)})
|
||||
}
|
||||
|
||||
def __init__(self, host):
|
||||
|
|
|
|||
Loading…
Reference in a new issue