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
G
gajim-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
62
Issues
62
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
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
gajim-plugins
Commits
c2ee1b52
Commit
c2ee1b52
authored
Nov 11, 2018
by
Philipp Hörist
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[pgp] Fix filetransfer
parent
2369f11a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
pgp/pgpplugin.py
pgp/pgpplugin.py
+10
-8
No files found.
pgp/pgpplugin.py
View file @
c2ee1b52
...
...
@@ -27,12 +27,15 @@ import queue
import
nbxmpp
from
gi.repository
import
GLib
from
gajim
import
dialogs
from
gajim.common
import
app
from
gajim.common.connection_handlers_events
import
MessageNotSentEvent
from
gajim.plugins
import
GajimPlugin
from
gajim.plugins.plugins_i18n
import
_
from
gajim.gtk.dialogs
import
ErrorDialog
from
gajim.gtk.dialogs
import
InformationDialog
from
gajim.gtk.dialogs
import
YesNoDialog
log
=
logging
.
getLogger
(
'gajim.plugin_system.oldpgp'
)
ERROR_MSG
=
''
...
...
@@ -108,19 +111,19 @@ class OldPGPPlugin(GajimPlugin):
key_id
=
chat_control
.
contact
.
keyID
transient
=
chat_control
.
parent_win
.
window
authenticated
,
info
=
check_state
(
key_id
,
account
)
dialogs
.
InformationDialog
(
authenticated
,
info
,
transient
)
InformationDialog
(
authenticated
,
info
,
transient
)
@
staticmethod
def
_before_sendmessage
(
chat_control
):
account
=
chat_control
.
account
if
not
chat_control
.
contact
.
keyID
:
dialogs
.
ErrorDialog
(
ErrorDialog
(
_
(
'No OpenPGP key assigned'
),
_
(
'No OpenPGP key is assigned to this contact. So you cannot '
'encrypt messages with OpenPGP.'
))
chat_control
.
sendmessage
=
False
elif
not
app
.
config
.
get_per
(
'accounts'
,
account
,
'keyid'
):
dialogs
.
ErrorDialog
(
ErrorDialog
(
_
(
'No OpenPGP key assigned'
),
_
(
'No OpenPGP key is assigned to your account. So you cannot '
'encrypt messages with OpenPGP.'
))
...
...
@@ -213,7 +216,7 @@ class OldPGPPlugin(GajimPlugin):
self
.
_finished_encrypt
(
obj
,
msgenc
=
msgenc
,
error
=
error
,
conn
=
conn
)
dialogs
.
YesNoDialog
(
YesNoDialog
(
_
(
'Untrusted OpenPGP key'
),
_
(
'The OpenPGP key used to encrypt this chat is not '
'trusted. Do you really want to encrypt this '
...
...
@@ -269,7 +272,7 @@ class OldPGPPlugin(GajimPlugin):
def
_encrypt_file_thread
(
self
,
file
,
account
,
callback
):
my_key_id
=
app
.
config
.
get_per
(
'accounts'
,
account
,
'keyid'
)
key_list
=
[
file
.
cont
rol
.
cont
act
.
keyID
,
my_key_id
]
key_list
=
[
file
.
contact
.
keyID
,
my_key_id
]
encrypted
=
self
.
get_gpg
(
account
).
encrypt_file
(
file
.
get_data
(),
key_list
)
if
not
encrypted
:
...
...
@@ -286,8 +289,7 @@ class OldPGPPlugin(GajimPlugin):
@
staticmethod
def
_on_file_encryption_error
(
file
,
error
):
dialogs
.
ErrorDialog
(
_
(
'Error'
),
error
,
transient_for
=
file
.
control
.
parent_win
.
window
)
ErrorDialog
(
_
(
'Error'
),
error
)
@
staticmethod
def
cleanup_stanza
(
obj
):
...
...
Philipp Hörist
@lovetox
mentioned in issue
#351 (closed)
·
Nov 11, 2018
mentioned in issue
#351 (closed)
mentioned in issue #351
Toggle commit list
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