better text when fingerprint change. fixes #3712
This commit is contained in:
parent
dbaac78ef5
commit
e695dddf24
10
src/gajim.py
10
src/gajim.py
|
@ -2247,7 +2247,7 @@ class Interface:
|
||||||
on_response_ok=on_ok, on_response_cancel=on_cancel)
|
on_response_ok=on_ok, on_response_cancel=on_cancel)
|
||||||
|
|
||||||
def handle_event_fingerprint_error(self, account, data):
|
def handle_event_fingerprint_error(self, account, data):
|
||||||
# ('FINGERPRINT_ERROR', account, (fingerprint,))
|
# ('FINGERPRINT_ERROR', account, (new_fingerprint,))
|
||||||
def on_yes():
|
def on_yes():
|
||||||
dialog.destroy()
|
dialog.destroy()
|
||||||
gajim.config.set_per('accounts', account, 'ssl_fingerprint_sha1',
|
gajim.config.set_per('accounts', account, 'ssl_fingerprint_sha1',
|
||||||
|
@ -2258,9 +2258,11 @@ class Interface:
|
||||||
gajim.connections[account].disconnect(on_purpose=True)
|
gajim.connections[account].disconnect(on_purpose=True)
|
||||||
self.handle_event_status(account, 'offline')
|
self.handle_event_status(account, 'offline')
|
||||||
pritext = _('SSL certificate error')
|
pritext = _('SSL certificate error')
|
||||||
sectext = _('It seems SSL certificate has changed or your connection is '
|
sectext = _('It seems the SSL certificate has changed or your connection '
|
||||||
'being hacked. Do you still want to connect and update the fingerprint'
|
'is being hacked.\nOld fingerprint: %s\nNew fingerprint: %s\n\nDo you '
|
||||||
'of the certificate?')
|
'still want to connect and update the fingerprint of the certificate?'\
|
||||||
|
) % (gajim.config.get_per('accounts', account, 'ssl_fingerprint_sha1'),
|
||||||
|
data[0])
|
||||||
dialog = dialogs.YesNoDialog(pritext, sectext, on_response_yes=on_yes,
|
dialog = dialogs.YesNoDialog(pritext, sectext, on_response_yes=on_yes,
|
||||||
on_response_no=on_no)
|
on_response_no=on_no)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue