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
Weblate
gajim
Commits
29c6af7e
Commit
29c6af7e
authored
16 years ago
by
Brendan Taylor
Browse files
Options
Downloads
Patches
Plain Diff
removed some odd flow control left behind when one of the session negotiation dialogs was removed
parent
f64cd6d2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/session.py
+26
-33
26 additions, 33 deletions
src/session.py
with
26 additions
and
33 deletions
src/session.py
+
26
−
33
View file @
29c6af7e
...
...
@@ -369,42 +369,35 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
try
:
# bob responds
if
form
.
getType
()
==
'
form
'
and
'
security
'
in
form
.
asDict
():
def
continue_with_negotiation
():
# we don't support 3-message negotiation as the responder
if
'
dhkeys
'
in
form
.
asDict
():
self
.
fail_bad_negotiation
(
'
3 message negotiation not supported when responding
'
,
(
'
dhkeys
'
,))
return
negotiated
,
not_acceptable
,
ask_user
=
self
.
verify_options_bob
(
form
)
if
ask_user
:
def
accept_nondefault_options
(
is_checked
):
self
.
dialog
.
destroy
()
negotiated
.
update
(
ask_user
)
self
.
respond_e2e_bob
(
form
,
negotiated
,
not_acceptable
)
def
reject_nondefault_options
():
self
.
dialog
.
destroy
()
for
key
in
ask_user
.
keys
():
not_acceptable
.
append
(
key
)
self
.
respond_e2e_bob
(
form
,
negotiated
,
not_acceptable
)
self
.
dialog
=
dialogs
.
YesNoDialog
(
_
(
'
Confirm these session options
'
),
_
(
'''
The remote client wants to negotiate an session with these features:
%s
Are these options acceptable?
'''
)
%
(
negotiation
.
describe_features
(
ask_user
)),
on_response_yes
=
accept_nondefault_options
,
on_response_no
=
reject_nondefault_options
)
else
:
# we don't support 3-message negotiation as the responder
if
'
dhkeys
'
in
form
.
asDict
():
self
.
fail_bad_negotiation
(
'
3 message negotiation not supported when responding
'
,
(
'
dhkeys
'
,))
return
negotiated
,
not_acceptable
,
ask_user
=
self
.
verify_options_bob
(
form
)
if
ask_user
:
def
accept_nondefault_options
(
is_checked
):
self
.
dialog
.
destroy
()
negotiated
.
update
(
ask_user
)
self
.
respond_e2e_bob
(
form
,
negotiated
,
not_acceptable
)
def
ignore_negotiation
(
widget
):
self
.
dialog
.
destroy
()
return
def
reject_nondefault_options
():
self
.
dialog
.
destroy
()
for
key
in
ask_user
.
keys
():
not_acceptable
.
append
(
key
)
self
.
respond_e2e_bob
(
form
,
negotiated
,
not_acceptable
)
continue_with_negotiation
()
self
.
dialog
=
dialogs
.
YesNoDialog
(
_
(
'
Confirm these session options
'
),
_
(
'''
The remote client wants to negotiate an session with these features:
%s
Are these options acceptable?
'''
)
%
(
negotiation
.
describe_features
(
ask_user
)),
on_response_yes
=
accept_nondefault_options
,
on_response_no
=
reject_nondefault_options
)
else
:
self
.
respond_e2e_bob
(
form
,
negotiated
,
not_acceptable
)
return
...
...
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