Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package protonvpn-gui for openSUSE:Factory checked in at 2022-11-30 15:00:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/protonvpn-gui (Old) and /work/SRC/openSUSE:Factory/.protonvpn-gui.new.1597 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "protonvpn-gui" Wed Nov 30 15:00:00 2022 rev:3 rq:1038936 version:1.12.0 Changes: -------- --- /work/SRC/openSUSE:Factory/protonvpn-gui/protonvpn-gui.changes 2022-07-08 14:01:55.646447690 +0200 +++ /work/SRC/openSUSE:Factory/.protonvpn-gui.new.1597/protonvpn-gui.changes 2022-11-30 15:00:59.553715340 +0100 @@ -1,0 +2,8 @@ +Mon Nov 28 14:25:46 UTC 2022 - Alexandre Vicenzi <alexandre.vice...@suse.com> + +- Update to 1.12.0 + * Ensure that whenever session is invalid, user is logged out + * If session is invalid, logout and inform the user about it. + * Stop displaying new brand dialog on new login. + +------------------------------------------------------------------- Old: ---- linux-app-1.10.0.tar.gz New: ---- linux-app-1.12.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ protonvpn-gui.spec ++++++ --- /var/tmp/diff_new_pack.Hm5NZa/_old 2022-11-30 15:01:00.061718136 +0100 +++ /var/tmp/diff_new_pack.Hm5NZa/_new 2022-11-30 15:01:00.065718159 +0100 @@ -18,7 +18,7 @@ %define pythons python3 Name: protonvpn-gui -Version: 1.10.0 +Version: 1.12.0 Release: 0 Summary: Official Proton VPN GUI License: GPL-3.0-or-later ++++++ linux-app-1.10.0.tar.gz -> linux-app-1.12.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/.gitlab-ci.yml new/linux-app-1.12.0/.gitlab-ci.yml --- old/linux-app-1.10.0/.gitlab-ci.yml 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/.gitlab-ci.yml 2022-10-20 17:14:34.000000000 +0200 @@ -70,17 +70,11 @@ script: - make image-fed36 branch=$CI_COMMIT_REF_SLUG src=fedora36 -make-image-fed34: +make-image-fed37: stage: image extends: make-image-deb script: - - make image-fed34 branch=$CI_COMMIT_REF_SLUG src=fedora34 - -make-image-fed35: - stage: image - extends: make-image-deb - script: - - make image-fed35 branch=$CI_COMMIT_REF_SLUG src=fedora35 + - make image-fed37 branch=$CI_COMMIT_REF_SLUG src=fedora37 ######## CI Jobs ########## test-deb: @@ -104,18 +98,12 @@ needs: - job: make-image-fed36 image: $CI_REGISTRY_IMAGE/fedora36:branch-$CI_COMMIT_REF_SLUG - -test-fed34: - extends: test-deb - needs: - - job: make-image-fed34 - image: $CI_REGISTRY_IMAGE/fedora34:branch-$CI_COMMIT_REF_SLUG -test-fed35: +test-fed37: extends: test-deb needs: - - job: make-image-fed35 - image: $CI_REGISTRY_IMAGE/fedora35:branch-$CI_COMMIT_REF_SLUG + - job: make-image-fed37 + image: $CI_REGISTRY_IMAGE/fedora37:branch-$CI_COMMIT_REF_SLUG ## Jobs to publish commits + tags from master to github release-publish-github: @@ -123,8 +111,7 @@ needs: - job: build-deb - job: build-fed36 - - job: build-fed34 - - job: build-fed35 + - job: build-fed37 when: manual variables: RELEASE_SYNC_PUBLIC_URL: g...@github.com:ProtonVPN/linux-app.git @@ -137,8 +124,7 @@ needs: - job: build-deb - job: build-fed36 - - job: build-fed34 - - job: build-fed35 + - job: build-fed37 when: manual variables: RELEASE_SYNC_PUBLIC_URL: g...@github.com:ProtonVPN/linux-app.git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/Dockerfile.fed34 new/linux-app-1.12.0/Dockerfile.fed34 --- old/linux-app-1.10.0/Dockerfile.fed34 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/Dockerfile.fed34 1970-01-01 01:00:00.000000000 +0100 @@ -1,72 +0,0 @@ -FROM IMAGE_URL_FED34 -ARG git_repo_lib -ENV git_repo_lib=${git_repo_lib:-GIT_REPO_LIB} -ARG git_repo_client -ENV git_repo_client=${git_repo_client:-GIT_REPO_CLIENT} -ARG git_branch -ENV git_branch=${git_branch:-GIT_BRANCH} - -ARG pkgname -ENV pkgname=${pkgname:-linux-app} -RUN dnf install -y \ - net-tools \ - gcc \ - sudo \ - git \ - rpm-build \ - rpm-devel \ - rpmlint \ - rpmdevtools \ - rpm-sign \ - python3 \ - python3-pip \ - NetworkManager \ - NetworkManager-openvpn \ - sudo \ - vim \ - nano \ - pkg-config \ - openvpn \ - openssl-devel \ - openssl-libs \ - dbus-x11 \ - gnome-keyring \ - libsecret \ - gtk3 \ - polkit \ - python3-gobject \ - python3-pyxdg \ - python3-dbus \ - python3-keyring \ - python3-distro \ - python3-gobject \ - python3-jinja2 \ - python3-pytest \ - python3-pytest-cov \ - python3-requests \ - python3-pyOpenSSL \ - python3-bcrypt \ - python3-gnupg \ - python3-systemd \ - && python3 -m pip install --upgrade sentry-sdk==0.10.2 \ - && useradd -ms /bin/bash user \ - && usermod -a -G wheel user \ - && echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -RUN git clone --single-branch --branch $git_branch $git_repo_client \ - && cd proton-python-client && pip3 install -e . \ - && rm -rf .git \ - && cd .. \ - && git clone --single-branch --branch $git_branch $git_repo_lib \ - && cd protonvpn-nm-lib && pip3 install -e . \ - && rm -rf .git && cd .. - -COPY docker_entry_rpm.sh /usr/local/bin -COPY . /home/user/$pkgname - -RUN chown -R user:user /home/user/$pkgname -WORKDIR /home/user/$pkgname - -USER user - -ENTRYPOINT ["/usr/local/bin/docker_entry_rpm.sh"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/Dockerfile.fed35 new/linux-app-1.12.0/Dockerfile.fed35 --- old/linux-app-1.10.0/Dockerfile.fed35 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/Dockerfile.fed35 1970-01-01 01:00:00.000000000 +0100 @@ -1,71 +0,0 @@ -FROM IMAGE_URL_FED35 -ARG git_repo_lib -ENV git_repo_lib=${git_repo_lib:-GIT_REPO_LIB} -ARG git_repo_client -ENV git_repo_client=${git_repo_client:-GIT_REPO_CLIENT} -ARG git_branch -ENV git_branch=${git_branch:-GIT_BRANCH} - -ARG pkgname -ENV pkgname=${pkgname:-linux-app} -RUN dnf install -y \ - net-tools \ - gcc \ - sudo \ - git \ - rpm-build \ - rpm-devel \ - rpmlint \ - rpmdevtools \ - rpm-sign \ - python3 \ - python3-pip \ - NetworkManager \ - NetworkManager-openvpn \ - sudo \ - nano \ - pkg-config \ - openvpn \ - openssl-devel \ - openssl-libs \ - dbus-x11 \ - gnome-keyring \ - libsecret \ - gtk3 \ - polkit \ - python3-gobject \ - python3-pyxdg \ - python3-dbus \ - python3-keyring \ - python3-distro \ - python3-gobject \ - python3-jinja2 \ - python3-pytest \ - python3-pytest-cov \ - python3-requests \ - python3-pyOpenSSL \ - python3-bcrypt \ - python3-gnupg \ - python3-systemd \ - && python3 -m pip install --upgrade sentry-sdk==0.10.2 \ - && useradd -ms /bin/bash user \ - && usermod -a -G wheel user \ - && echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers - -RUN git clone --single-branch --branch $git_branch $git_repo_client \ - && cd proton-python-client && pip3 install -e . \ - && rm -rf .git \ - && cd .. \ - && git clone --single-branch --branch $git_branch $git_repo_lib \ - && cd protonvpn-nm-lib && pip3 install -e . \ - && rm -rf .git && cd .. - -COPY docker_entry_rpm.sh /usr/local/bin -COPY . /home/user/$pkgname - -RUN chown -R user:user /home/user/$pkgname -WORKDIR /home/user/$pkgname - -USER user - -ENTRYPOINT ["/usr/local/bin/docker_entry_rpm.sh"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/Dockerfile.fed37 new/linux-app-1.12.0/Dockerfile.fed37 --- old/linux-app-1.10.0/Dockerfile.fed37 1970-01-01 01:00:00.000000000 +0100 +++ new/linux-app-1.12.0/Dockerfile.fed37 2022-10-20 17:14:34.000000000 +0200 @@ -0,0 +1,71 @@ +FROM IMAGE_URL_FED37 +ARG git_repo_lib +ENV git_repo_lib=${git_repo_lib:-GIT_REPO_LIB} +ARG git_repo_client +ENV git_repo_client=${git_repo_client:-GIT_REPO_CLIENT} +ARG git_branch +ENV git_branch=${git_branch:-GIT_BRANCH} + +ARG pkgname +ENV pkgname=${pkgname:-linux-app} +RUN dnf install -y \ + net-tools \ + gcc \ + sudo \ + git \ + rpm-build \ + rpm-devel \ + rpmlint \ + rpmdevtools \ + rpm-sign \ + python3 \ + python3-pip \ + NetworkManager \ + NetworkManager-openvpn \ + sudo \ + nano \ + pkg-config \ + openvpn \ + openssl-devel \ + openssl-libs \ + dbus-x11 \ + gnome-keyring \ + libsecret \ + gtk3 \ + polkit \ + python3-gobject \ + python3-pyxdg \ + python3-dbus \ + python3-keyring \ + python3-distro \ + python3-gobject \ + python3-jinja2 \ + python3-pytest \ + python3-pytest-cov \ + python3-requests \ + python3-pyOpenSSL \ + python3-bcrypt \ + python3-gnupg \ + python3-systemd \ + && python3 -m pip install --upgrade sentry-sdk==0.10.2 \ + && useradd -ms /bin/bash user \ + && usermod -a -G wheel user \ + && echo '%wheel ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers + +RUN git clone --single-branch --branch $git_branch $git_repo_client \ + && cd proton-python-client && pip3 install -e . \ + && rm -rf .git \ + && cd .. \ + && git clone --single-branch --branch $git_branch $git_repo_lib \ + && cd protonvpn-nm-lib && pip3 install -e . \ + && rm -rf .git && cd .. + +COPY docker_entry_rpm.sh /usr/local/bin +COPY . /home/user/$pkgname + +RUN chown -R user:user /home/user/$pkgname +WORKDIR /home/user/$pkgname + +USER user + +ENTRYPOINT ["/usr/local/bin/docker_entry_rpm.sh"] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/Makefile new/linux-app-1.12.0/Makefile --- old/linux-app-1.10.0/Makefile 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/Makefile 2022-10-20 17:14:34.000000000 +0200 @@ -15,12 +15,11 @@ IMAGE_URL_DEB = ubuntu:latest IMAGE_URL_FED36 = fedora:36 -IMAGE_URL_FED34 = fedora:34 -IMAGE_URL_FED35 = fedora:35 +IMAGE_URL_FED37 = fedora:37 IMAGE_URL_ARCH = archlinux:latest # Run make base to build both images based on ubuntu and fedora -base: image-deb image-fed36 image-fed34 image-fed35 image-arch +base: image-deb image-fed36 image-fed37 image-arch # Create the image based on ubuntu image-deb: image @@ -37,15 +36,10 @@ image-fed36: DOCKER_FILE_SOURCE = Dockerfile.fed36 image-fed36: src = fedora36 -# Create the image based on fedora 34 -image-fed34: image -image-fed34: DOCKER_FILE_SOURCE = Dockerfile.fed34 -image-fed34: src = fedora34 - -# Create the image based on fedora 35 -image-fed35: image -image-fed35: DOCKER_FILE_SOURCE = Dockerfile.fed35 -image-fed35: src = fedora35 +# Create the image based on fedora 37 +image-fed37: image +image-fed37: DOCKER_FILE_SOURCE = Dockerfile.fed37 +image-fed37: src = fedora37 ## Make remote image form a branch make image branch=<branchName> (master default) image: requirements.txt docker-source @@ -60,7 +54,7 @@ ## We host our own copy of the image ubuntu:latest docker-source: - sed "s|IMAGE_URL_FED36|$(IMAGE_URL_FED36)|; s|IMAGE_URL_FED34|$(IMAGE_URL_FED34)|; s|IMAGE_URL_FED35|$(IMAGE_URL_FED35)|; s|IMAGE_URL_DEB|$(IMAGE_URL_DEB)|; s|IMAGE_URL_ARCH|$(IMAGE_URL_ARCH)|" $(DOCKER_FILE_SOURCE) > /tmp/Dockerfile.image + sed "s|IMAGE_URL_FED36|$(IMAGE_URL_FED36)|; s|IMAGE_URL_FED37|$(IMAGE_URL_FED37)|; s|IMAGE_URL_DEB|$(IMAGE_URL_DEB)|; s|IMAGE_URL_ARCH|$(IMAGE_URL_ARCH)|" $(DOCKER_FILE_SOURCE) > /tmp/Dockerfile.image requirements.txt: @ touch requirements.txt @@ -82,7 +76,7 @@ @ rm -rf __SOURCE_APP || true local: NAME_IMAGE = $(PYTHON_FOLDER):latest -local-base: local-deb local-fed36 local-fed34 local-fed35 local-arch +local-base: local-deb local-fed36 local-fed37 local-arch local-deb: local local-deb: DOCKER_FILE_SOURCE = Dockerfile.deb @@ -93,11 +87,8 @@ local-fed36: local local-fed36: DOCKER_FILE_SOURCE = Dockerfile.fed36 -local-fed34: local -local-fed34: DOCKER_FILE_SOURCE = Dockerfile.fed34 - -local-fed35: local -local-fed35: DOCKER_FILE_SOURCE = Dockerfile.fed35 +local-fed37: local +local-fed37: DOCKER_FILE_SOURCE = Dockerfile.fed37 local-arch: local local-arch: DOCKER_FILE_SOURCE = Dockerfile.arch @@ -132,18 +123,8 @@ --volume $(PWD)/.env:/home/user/proton-python-client.env \ proton-python-client:latest \ python3 -m pytest - -test-fed34: local-fed34 - # Keep -it because with colors it's better - @ docker run \ - --rm \ - -it \ - --privileged \ - --volume $(PWD)/.env:/home/user/proton-python-client.env \ - proton-python-client:latest \ - python3 -m pytest -test-fed35: local-fed35 +test-fed37: local-fed37 # Keep -it because with colors it's better @ docker run \ --rm \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/arch/PKGBUILD new/linux-app-1.12.0/arch/PKGBUILD --- old/linux-app-1.10.0/arch/PKGBUILD 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/arch/PKGBUILD 2022-10-20 17:14:34.000000000 +0200 @@ -1,8 +1,8 @@ # Maintainer: Proton Technologies AG <opensou...@proton.me> pkgname=protonvpn-gui -pkgver=1.10.0 -pkgrel=2 +pkgver=1.11.0 +pkgrel=5 pkgdesc="Official Proton VPN GUI." arch=("any") url="https://github.com/ProtonVPN/" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/debian/changelog new/linux-app-1.12.0/debian/changelog --- old/linux-app-1.10.0/debian/changelog 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/debian/changelog 2022-10-20 17:14:34.000000000 +0200 @@ -1,3 +1,16 @@ +protonvpn-gui (1.12.0-1) unstable; urgency=medium + + * Fix: Ensure that whenever session is invalid, user is logged out. + + -- Proton Technologies AG <opensou...@proton.me> Tue, 18 Oct 2022 16:00:00 +0000 + +protonvpn-gui (1.11.0-5) unstable; urgency=medium + + * Fix: If session is invalid, logout and inform the user about it. + * Fix: Stop displaying new brand dialog on new login. + + -- Proton Technologies AG <opensou...@proton.me> Thu, 01 Sep 2022 17:00:00 +0000 + protonvpn-gui (1.10.0-2) unstable; urgency=medium * Fix: New brand dialog will now only appear once after the dashboard has been loaded diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/protonvpn_gui/constants.py new/linux-app-1.12.0/protonvpn_gui/constants.py --- old/linux-app-1.10.0/protonvpn_gui/constants.py 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/protonvpn_gui/constants.py 2022-10-20 17:14:34.000000000 +0200 @@ -3,7 +3,7 @@ from .enums import (DashboardKillSwitchIconEnum, DashboardNetshieldIconEnum, DashboardSecureCoreIconEnum) -APP_VERSION = "1.10.0" +APP_VERSION = "1.12.0" ABSOLUTE_DIR_PATH = os.path.dirname(os.path.abspath(__file__)) ASSETS_DIR_PATH = os.path.join(ABSOLUTE_DIR_PATH, "assets") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/protonvpn_gui/view/dashboard.py new/linux-app-1.12.0/protonvpn_gui/view/dashboard.py --- old/linux-app-1.10.0/protonvpn_gui/view/dashboard.py 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/protonvpn_gui/view/dashboard.py 2022-10-20 17:14:34.000000000 +0200 @@ -208,7 +208,6 @@ elif isinstance(state, QuickSettingsStatus): UpdateQuickSettings(self, state) elif isinstance(state, DisplayEvent): - print("New event: ", state) EventNotification(self, state) elif isinstance(state, DisplayDialog): DisplayMessageDialog( @@ -298,6 +297,7 @@ def setup_properties(self): # ViewModel self.dashboard_view_model = Module().dashboard_view_model + self.dashboard_view_model.gtk_app = self.application self.dashboard_view_model.state.subscribe( lambda state: GLib.idle_add(self.render_view_state, state) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/protonvpn_gui/view/dashboard_states/states.py new/linux-app-1.12.0/protonvpn_gui/view/dashboard_states/states.py --- old/linux-app-1.10.0/protonvpn_gui/view/dashboard_states/states.py 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/protonvpn_gui/view/dashboard_states/states.py 2022-10-20 17:14:34.000000000 +0200 @@ -6,8 +6,7 @@ from ...enums import DashboardFeaturesEnum, GLibEventSourceEnum from ...patterns.factory import WidgetFactory -from ...view_model.dataclass.dashboard import (GenericEvent, - WelcomeToNewBrandEvent) +from ...view_model.dataclass.dashboard import GenericEvent class InitLoadView: @@ -263,12 +262,6 @@ dashboard_view, state.event_dataclass.class_instance, state.has_notification_been_opened, state.set_notification_as_read ) - elif isinstance(state.event_dataclass, WelcomeToNewBrandEvent): - from ..dialog import WelomeToNewBrandDialog - WelomeToNewBrandDialog(dashboard_view.application, callback_func=state.set_notification_as_read) - - def test_callback(self): - print("Callback worked") def __check_if_generic_event_should_be_displayed(self, *args): dashboard_view, event_data, has_notification_been_opened, set_as_read = args diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/protonvpn_gui/view_model/dashboard.py new/linux-app-1.12.0/protonvpn_gui/view_model/dashboard.py --- old/linux-app-1.10.0/protonvpn_gui/view_model/dashboard.py 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/protonvpn_gui/view_model/dashboard.py 2022-10-20 17:14:34.000000000 +0200 @@ -116,10 +116,19 @@ self.__quick_settings_vm.dashboard_view_model = self self.__server_list_vm.dashboard_view_model = self + self._gtk_app = None self.__state = ReplaySubject(buffer_size=1) @property + def gtk_app(self): + return self._gtk_app + + @gtk_app.setter + def gtk_app(self, newvalue): + self._gtk_app = newvalue + + @property def state(self): from protonvpn_gui.rx.internal.exceptions import DisposedException try: @@ -166,12 +175,24 @@ server list. This needs to be pre-loaded before displaying the dashboard.""" - self.__display_new_brand_dialog_if_not_opened() - self.check_if_events_should_be_displayed() + try: + self.check_if_events_should_be_displayed() + except: # noqa + return + self.state.on_next(self.get_quick_settings_state()) try: self.__server_list_vm.on_load_servers() + except exceptions.APISessionIsNotValidError as e: + logger.exception(e) + result = dt.DisplayDialog( + title="Invalid Session", + text="Your session is invalid. Please login to re-authenticate." + ) + self.on_disconnect() + self._gtk_app.on_logout() + self.state.on_next(result) except (exceptions.ProtonVPNException, Exception) as e: logger.exception(e) result = dt.DisplayDialog( @@ -188,19 +209,23 @@ return True - def __display_new_brand_dialog_if_not_opened(self): - print("Running display enw brand dilaog") - print("protonvpn.get_settings().new_brand", protonvpn.get_settings().new_brand) - if protonvpn.get_settings().new_brand == NotificationStatusEnum.NOT_OPENED: - self.state.on_next( - dt.DisplayEvent( - dt.WelcomeToNewBrandEvent(None), False, self.set_new_brand_dialog_opened - ) - ) - def check_if_events_should_be_displayed(self, *_): """Sync check if events should be displayed.""" - all_notitications = protonvpn.get_session().get_all_notifications() + try: + all_notitications = protonvpn.get_session().get_all_notifications() + except exceptions.APISessionIsNotValidError as e: + logger.exception(e) + self.force_logout() + raise + except (exceptions.ProtonVPNException, Exception) as e: + logger.exception(e) + result = dt.DisplayDialog( + title="Error Loading Servers", + text=str(e) + ) + self.state.on_next(result) + raise + if not isinstance(all_notitications, list): return @@ -221,6 +246,20 @@ ) ) + def force_logout(self): + result = dt.DisplayDialog( + title="Invalid Session", + text="Your session is invalid. Please login to re-authenticate." + ) + self.on_disconnect() + p = BackgroundProcess.factory("gtask") + p.setup( + target=self._gtk_app._logout, + callback=self._gtk_app.display_login_window, + ) + p.start() + self.state.on_next(result) + def set_notification_as_read(self): protonvpn.get_settings().event_notification = NotificationStatusEnum.OPENED @@ -540,14 +579,14 @@ the reasons specified in class docstring. """ self.state.on_next(dt.Loading()) - result = self._get_not_connected_state() + not_connected_state = self._get_not_connected_state() try: protonvpn.disconnect() except (exceptions.ConnectionNotFound, AttributeError): pass - self.state.on_next(result) + self.state.on_next(not_connected_state) return False def _get_connected_state(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/protonvpn_gui/view_model/login.py new/linux-app-1.12.0/protonvpn_gui/view_model/login.py --- old/linux-app-1.10.0/protonvpn_gui/view_model/login.py 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/protonvpn_gui/view_model/login.py 2022-10-20 17:14:34.000000000 +0200 @@ -100,11 +100,11 @@ display_human_verification_dialog, callback ) + else: + self.__username = None + self.__password = None self.__captcha = None - - self.__username = None - self.__password = None self.state.on_next(result) def is_killswitch_enabled(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/protonvpn_gui/view_model/server_list.py new/linux-app-1.12.0/protonvpn_gui/view_model/server_list.py --- old/linux-app-1.10.0/protonvpn_gui/view_model/server_list.py 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/protonvpn_gui/view_model/server_list.py 2022-10-20 17:14:34.000000000 +0200 @@ -1,5 +1,6 @@ from ..patterns.factory import BackgroundProcess from protonvpn_nm_lib.api import protonvpn +from protonvpn_nm_lib import exceptions as lib_exceptions from protonvpn_nm_lib.enums import ServerTierEnum, SecureCoreStatusEnum from .dataclass.dashboard import ServerListData, SwitchServerList from ..logger import logger @@ -51,9 +52,11 @@ def __finish_on_update_server_load(self, self_thread=None, task=None, data=None): if self_thread and task: - var = bool(task.propagate_int()) - if var: + var = task.propagate_int() + if var == 1: self.__update_server_load = False + elif var == 2: + self.dashboard_view_model.force_logout() def on_update_server_load_async(self): """Update server Load. @@ -84,27 +87,32 @@ method can be safely used at anytime. This method is and should be executed within a python thread. + + The numbers below were defined arbitrarly, meaning that we could easily change then + to any other values here and inside `__finish_on_update_server_load`, as the meaning + is only for us, as the Gio.Task doesn't care about the value, as long as it's `int`. """ session = protonvpn.get_session() - # By requests the servers, it will automatically trigger a request + # By requesting the servers, it will automatically trigger a request # to the API, to updated the serverlist if needed. try: - session.servers - except Exception as e: - # Display dialog with message + _ = session.servers + except lib_exceptions.APISessionIsNotValidError as e: logger.exception(e) if task: - task.return_int(0) - return - - try: - self.on_load_servers_async(False) + task.return_int(2) except Exception as e: - # Display dialog with message logger.exception(e) if task: task.return_int(0) else: - if task: - task.return_int(1) + try: + self.on_load_servers_async(False) + except Exception as e: + logger.exception(e) + if task: + task.return_int(0) + else: + if task: + task.return_int(1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/linux-app-1.10.0/rpmbuild/SPECS/protonvpn-gui.spec new/linux-app-1.12.0/rpmbuild/SPECS/protonvpn-gui.spec --- old/linux-app-1.10.0/rpmbuild/SPECS/protonvpn-gui.spec 2022-05-31 16:12:27.000000000 +0200 +++ new/linux-app-1.12.0/rpmbuild/SPECS/protonvpn-gui.spec 2022-10-20 17:14:34.000000000 +0200 @@ -1,8 +1,8 @@ %define unmangled_name protonvpn-gui %define logo_name protonvpn-logo.png %define desktop_name protonvpn.desktop -%define version 1.10.0 -%define release 2 +%define version 1.12.0 +%define release 1 Prefix: %{_prefix} @@ -63,7 +63,17 @@ %defattr(-,root,root) %changelog -* tue May 31 2022 Proton Technologies AG <opensou...@proton.me> 1.10.0-2 +* Tue Oct 18 2022 Proton Technologies AG <opensou...@proton.me> 1.12.0-1 +- Fix: Ensure that whenever session is invalid, user is logged out. + +* Thu Sep 22 2022 Proton Technologies AG <opensou...@proton.me> 1.11.0-6 +- Drop F34-35 and add F37 + +* Thu Sep 01 2022 Proton Technologies AG <opensou...@proton.me> 1.11.0-5 +- Fix: If session is invalid, logout and inform the user about it. +- Fix: Stop displaying new brand dialog on new login. + +* Tue May 31 2022 Proton Technologies AG <opensou...@proton.me> 1.10.0-2 - Fix: New brand dialog will now only appear once after the dashboard has been loaded * Mon May 30 2022 Proton Technologies AG <opensou...@proton.me> 1.9.0-2