Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
python-nbxmpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gajim
python-nbxmpp
Commits
59feb87f
Commit
59feb87f
authored
Oct 22, 2020
by
Philipp Hörist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Discovery: Raise MalformedStanzaError
parent
7ca6def3
Pipeline
#6629
failed with stages
in 44 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
nbxmpp/modules/discovery.py
nbxmpp/modules/discovery.py
+4
-4
No files found.
nbxmpp/modules/discovery.py
View file @
59feb87f
...
...
@@ -30,8 +30,8 @@ from nbxmpp.structs import DiscoInfo
from
nbxmpp.structs
import
DiscoItems
from
nbxmpp.structs
import
DiscoItem
from
nbxmpp.structs
import
StanzaHandler
from
nbxmpp.util
import
raise_error
from
nbxmpp.task
import
iq_request_task
from
nbxmpp.errors
import
MalformedStanzaError
from
nbxmpp.errors
import
StanzaError
...
...
@@ -100,13 +100,13 @@ def parse_disco_info(stanza, timestamp=None):
name
=
attrs
.
get
(
'name'
),
lang
=
attrs
.
get
(
'xml:lang'
)))
except
Exception
:
r
eturn
raise_error
(
log
.
warning
,
stanza
,
'stanza-malformed'
)
r
aise
MalformedStanzaError
(
'invalid attributes'
,
stanza
)
for
node
in
query
.
getTags
(
'feature'
):
try
:
features
.
append
(
node
.
getAttr
(
'var'
))
except
Exception
:
r
eturn
raise_error
(
log
.
warning
,
stanza
,
'stanza-malformed'
)
r
aise
MalformedStanzaError
(
'invalid attributes'
,
stanza
)
for
node
in
query
.
getTags
(
'x'
,
namespace
=
Namespace
.
DATA
):
dataforms
.
append
(
extend_form
(
node
))
...
...
@@ -130,7 +130,7 @@ def parse_disco_items(stanza):
name
=
attrs
.
get
(
'name'
),
node
=
attrs
.
get
(
'node'
)))
except
Exception
:
r
eturn
raise_error
(
log
.
warning
,
stanza
,
'stanza-malformed'
)
r
aise
MalformedStanzaError
(
'invalid attributes'
,
stanza
)
return
DiscoItems
(
jid
=
stanza
.
getFrom
(),
node
=
query
.
getAttr
(
'node'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment