Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eta
gajim
Commits
c69b4e90
Commit
c69b4e90
authored
16 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
detect and handle incorrect stream start. Fixes #4499
parent
4728a3d9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/xmpp/dispatcher_nb.py
+4
-0
4 additions, 0 deletions
src/common/xmpp/dispatcher_nb.py
src/common/xmpp/simplexml.py
+5
-1
5 additions, 1 deletion
src/common/xmpp/simplexml.py
with
9 additions
and
1 deletion
src/common/xmpp/dispatcher_nb.py
+
4
−
0
View file @
c69b4e90
...
...
@@ -141,6 +141,10 @@ class Dispatcher(PlugIn):
self
.
DEBUG
(
'
Invalid XML received from server. Forcing disconnect.
'
,
'
error
'
)
self
.
_owner
.
Connection
.
pollend
()
return
0
except
ValueError
,
e
:
self
.
DEBUG
(
str
(
e
),
'
error
'
)
self
.
_owner
.
Connection
.
pollend
()
return
0
if
len
(
self
.
_pendingExceptions
)
>
0
:
_pendingException
=
self
.
_pendingExceptions
.
pop
()
raise
_pendingException
[
0
],
_pendingException
[
1
],
_pendingException
[
2
]
...
...
This diff is collapsed.
Click to expand it.
src/common/xmpp/simplexml.py
+
5
−
1
View file @
c69b4e90
...
...
@@ -386,7 +386,11 @@ class NodeBuilder:
else
:
self
.
_document_attrs
[
attr
]
=
val
ns
=
self
.
_document_nsp
.
get
(
nsp
,
'
http://www.gajim.org/xmlns/undeclared-root
'
)
self
.
stream_header_received
(
ns
,
name
,
attrs
)
try
:
self
.
stream_header_received
(
ns
,
name
,
attrs
)
except
ValueError
,
e
:
self
.
_document_attrs
=
None
raise
ValueError
(
str
(
e
))
if
not
self
.
last_is_data
and
self
.
_ptr
.
parent
:
self
.
_ptr
.
parent
.
data
.
append
(
''
)
self
.
last_is_data
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment