From 21ce355c137e1d5dbe552c1432aaa5d40d14d759 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Thu, 2 Oct 2014 18:26:29 -0300 Subject: Remove email instructions/reference. Closes #6140. - cleanup some code, - remove unused import, - pep8 fixes --- src/leap/bitmask/gui/mainwindow.py | 52 ++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index cc4ede09..1b61de87 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -34,7 +34,6 @@ from leap.bitmask import __version_hash__ as VERSION_HASH from leap.bitmask.backend.leapbackend import ERROR_KEY, PASSED_KEY from leap.bitmask.config import flags -from leap.bitmask.config.leapsettings import LeapSettings from leap.bitmask.gui.advanced_key_management import AdvancedKeyManagement from leap.bitmask.gui.eip_status import EIPStatusWidget @@ -53,9 +52,6 @@ from leap.bitmask.platform_init import locks from leap.bitmask.platform_init.initializers import init_platform from leap.bitmask.platform_init.initializers import init_signals -from leap.bitmask.backend.backend_proxy import BackendProxy -from leap.bitmask.backend.leapsignaler import LeapSignaler - from leap.bitmask.services.eip import conductor as eip_conductor from leap.bitmask.services.mail import conductor as mail_conductor @@ -144,7 +140,8 @@ class MainWindow(QtGui.QMainWindow): # Qt Signal Connections ##################################### # TODO separate logic from ui signals. - self.app.service_selection_changed.connect(self._update_eip_enabled_status) + self.app.service_selection_changed.connect( + self._update_eip_enabled_status) self._login_widget.login.connect(self._login) self._login_widget.cancel_login.connect(self._cancel_login) self._login_widget.logout.connect(self._logout) @@ -210,7 +207,11 @@ class MainWindow(QtGui.QMainWindow): self.ui.action_quit.triggered.connect(self.quit) self.ui.action_wizard.triggered.connect(self._launch_wizard) self.ui.action_show_logs.triggered.connect(self._show_logger_window) - self.ui.action_help.triggered.connect(self._help) + + # XXX hide the help menu since it only shows email information and + # right now we don't have stable mail and just confuses users. + self.ui.action_help.setVisible(False) + # self.ui.action_help.triggered.connect(self._help) self.ui.action_create_new_account.triggered.connect( self._on_provider_changed) @@ -600,10 +601,12 @@ class MainWindow(QtGui.QMainWindow): self._backend_cannot_start_eip() return - if not EIP_SERVICE in self.app.settings.get_enabled_services(domain): + if EIP_SERVICE not in self.app.settings.get_enabled_services(domain): self._eip_conductor.terminate() + def hide(): - self.app.backend.eip_can_start(domain=domain) + self.app.backend.eip_can_start(domain=domain) + QtDelayedCall(100, hide) # ^^ VERY VERY Hacky, but with the simple state machine, # there is no way to signal 'disconnect and then disable' @@ -615,7 +618,6 @@ class MainWindow(QtGui.QMainWindow): # check if EIP can start (will trigger widget update) self.app.backend.eip_can_start(domain=domain) - def _backend_can_start_eip(self): """ TRIGGER: @@ -1003,22 +1005,22 @@ class MainWindow(QtGui.QMainWindow): today = datetime.now().date() greet = ("Happy New 1984!... or not ;)

" if today.month == 1 and today.day < 15 else "") - QtGui.QMessageBox.about( - self, self.tr("About Bitmask - %s") % (VERSION,), - self.tr("Version: %s (%s)
" - "
%s" - "Bitmask is the Desktop client application for " - "the LEAP platform, supporting encrypted internet " - "proxy, secure email, and secure chat (coming soon).
" - "
" - "LEAP is a non-profit dedicated to giving " - "all internet users access to secure " - "communication. Our focus is on adapting " - "encryption technology to make it easy to use " - "and widely available.
" - "
" - "More about LEAP" - "") % (VERSION, VERSION_HASH[:10], greet)) + title = self.tr("About Bitmask - %s") % (VERSION,) + msg = self.tr( + "Version: {ver} ({ver_hash})
" + "
{greet}" + "Bitmask is the Desktop client application for the LEAP " + "platform, supporting encrypted internet proxy.
" + # "Secure email is comming soon.
" + "
" + "LEAP is a non-profit dedicated to giving all internet users " + "access to secure communication. Our focus is on adapting " + "encryption technology to make it easy to use and widely " + "available.
" + "
" + "More about LEAP") + msg = msg.format(ver=VERSION, ver_hash=VERSION_HASH[:10], greet=greet) + QtGui.QMessageBox.about(self, title, msg) @QtCore.Slot() def _help(self): -- cgit v1.2.3 From 2c8cd4c4f225536bb506b9df7240767b2b7765f4 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Mon, 10 Nov 2014 16:20:06 -0300 Subject: Add support for the internal LXDE polkit agent. Closes #6043. --- src/leap/bitmask/util/privilege_policies.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/leap/bitmask/util/privilege_policies.py b/src/leap/bitmask/util/privilege_policies.py index 2016e67b..68a1af28 100644 --- a/src/leap/bitmask/util/privilege_policies.py +++ b/src/leap/bitmask/util/privilege_policies.py @@ -179,6 +179,7 @@ class LinuxPolicyChecker(PolicyChecker): 'ps aux | grep "polkit-[k]de-authentication-agent-1"', 'ps aux | grep "polkit-[m]ate-authentication-agent-1"', 'ps aux | grep "[l]xpolkit"', + 'ps aux | grep "[l]xsession"', 'ps aux | grep "[g]nome-shell"', 'ps aux | grep "[f]ingerprint-polkit-agent"', ] -- cgit v1.2.3 From b13193406f81c80d12fc185a135e7df38b173648 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 7 Nov 2014 20:19:01 +0100 Subject: Fix compatibilty with newest openssl. Closes: #6133 Newest OpenSSL expect cafile to be None or byte stream (was retunrning unicode) --- src/leap/bitmask/config/providerconfig.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/leap/bitmask/config/providerconfig.py b/src/leap/bitmask/config/providerconfig.py index 57bc3a98..386c697d 100644 --- a/src/leap/bitmask/config/providerconfig.py +++ b/src/leap/bitmask/config/providerconfig.py @@ -201,7 +201,8 @@ class ProviderConfig(BaseConfig): leap_check(cert_exists, error_msg, MissingCACert) logger.debug("Going to verify SSL against %s" % (cert_path,)) - return cert_path + # OpenSSL does not handle unicode. + return cert_path.encode('utf-8') def provides_eip(self): """ -- cgit v1.2.3 From 26ec219c305d2033457b3c2689d918a49815f0f6 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 7 Nov 2014 20:14:51 +0100 Subject: Do not use logger.exception during provider checks. Closes: #6219 leap log handler was choking on the captured exception. it might have to do with the exception unwinding made by the reactor. this is a workaround to allow the provider checks to show a meaningful error message. The backtrace should only be there for development purpuses, so removing it. --- src/leap/bitmask/provider/providerbootstrapper.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/provider/providerbootstrapper.py b/src/leap/bitmask/provider/providerbootstrapper.py index 71edbb87..8eefb9d9 100644 --- a/src/leap/bitmask/provider/providerbootstrapper.py +++ b/src/leap/bitmask/provider/providerbootstrapper.py @@ -148,7 +148,6 @@ class ProviderBootstrapper(AbstractBootstrapper): timeout=REQUEST_TIMEOUT) res.raise_for_status() except requests.exceptions.SSLError as exc: - logger.exception(exc) self._err_msg = self.tr("Provider certificate could " "not be verified") raise @@ -156,7 +155,6 @@ class ProviderBootstrapper(AbstractBootstrapper): # XXX careful!. The error might be also a SSL handshake # timeout error, in which case we should retry a couple of times # more, for cases where the ssl server gives high latencies. - logger.exception(exc) self._err_msg = self.tr("Provider does not support HTTPS") raise -- cgit v1.2.3 From d6d73d41278c7c438c27f286bc5f6106d37f51d2 Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 10 Nov 2014 20:41:56 -0800 Subject: vpn: support for the server setting custom fragment openvpn option --- src/leap/bitmask/services/eip/eipconfig.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/leap/bitmask/services/eip/eipconfig.py b/src/leap/bitmask/services/eip/eipconfig.py index 5b51d12e..659ca1b1 100644 --- a/src/leap/bitmask/services/eip/eipconfig.py +++ b/src/leap/bitmask/services/eip/eipconfig.py @@ -216,7 +216,7 @@ class EIPConfig(ServiceConfig): """ _service_name = "eip" - OPENVPN_ALLOWED_KEYS = ("auth", "cipher", "tls-cipher") + OPENVPN_ALLOWED_KEYS = ("auth", "cipher", "tls-cipher", "fragment") OPENVPN_CIPHERS_REGEX = re.compile("[A-Z0-9\-]+") def __init__(self): @@ -255,6 +255,11 @@ class EIPConfig(ServiceConfig): These are sanitized with alphanumeric whitelist. + NOTE: some openvpn config option don't take a value, but + this method currently requires that every option has a value. + Also, this does not yet work with values with spaces, like + `keepalive 10 30` + :returns: openvpn configuration dict :rtype: C{dict} """ @@ -262,7 +267,7 @@ class EIPConfig(ServiceConfig): config = {} for key, value in ovpncfg.items(): if key in self.OPENVPN_ALLOWED_KEYS and value is not None: - sanitized_val = self.OPENVPN_CIPHERS_REGEX.findall(value) + sanitized_val = self.OPENVPN_CIPHERS_REGEX.findall(str(value)) if len(sanitized_val) != 0: _val = sanitized_val[0] config[str(key)] = str(_val) -- cgit v1.2.3