Giter Site home page Giter Site logo

Comments (9)

calexandru2018 avatar calexandru2018 commented on June 12, 2024 2

Hey @Anonymous941 thanks for the PR (and thank you @Wizzerinus for taking your time in identifying and fixing the issue). I'll take this PR and discuss this internally with our team.

from proton-vpn-gtk-app.

Wizzerinus avatar Wizzerinus commented on June 12, 2024 1

For anyone wondering, I found the possible cause of this bug. Note that this may be setup dependent and not fix the bug for every single user of this app. (This was also reported through the support system)

So, ProtonVPN includes a number of PEM-encoded certificates in their secret files. They look like this:

-----BEGIN PUBLIC KEY-----
SomeLongBase64String
MaybeAnotherOneHere
-----END PUBLIC KEY-----

As you can see, there are newline breaks within this certificate. So, when ProtonVPN saves this certificate into the keyring, it gets saved as is. Note that ProtonVPN uses json files to store their secrets, so they're actually saving something like this:

{"ServerPublicKey": "-----BEGIN PUBLIC KEY-----\nSomeLongBase64String\nMaybeAnotherOneHere\n-----END PUBLIC KEY-----\n"}

When the app reads the secrets however, the \n sequences are magically transformed into \n characters, so the variable looks like this now:

{"ServerPublicKey": "-----BEGIN PUBLIC KEY-----
SomeLongBase64String
MaybeAnotherOneHere
-----END PUBLIC KEY-----
"}

As you can see this is not a valid JSON file, the github's syntax highlighter also agrees. So, this cannot be parsed by the code, and then the following happens:

https://github.com/ProtonVPN/python-proton-keyring-linux/blob/5ff3c7f9a1a162836649502dd23c2fbe1f487d73/proton/keyring_linux/core/keyring_linux.py#L63

This code deletes the secret whenever parsing fails, creating this bug.

You can bugfix this yourself by editing your copy of keyring_linux.py to include something like stored_data = stored_data.replace("\n", "\\n") before parsing the data with JSON. (Again, not sure if this is the cause of the bug for everyone, because it depends on a lot of factors! Sorry if this does not work for you, but it did work for me which is why I'm sharing it.)

from proton-vpn-gtk-app.

Anonymous941 avatar Anonymous941 commented on June 12, 2024

Found something else: it makes the login proton-sso-accounts permanently, and while running, the login proton-sso-account-xxxxx:

Keyring screenshot

The problem is the proton-sso-account-xxxxx is deleted every time the app is restarted for some reason (after starting it again), causing you to have to re-login each time. I'm not sure why it makes multiple keyrings, however

from proton-vpn-gtk-app.

Anonymous941 avatar Anonymous941 commented on June 12, 2024

@Wizzerinus Thank you, this worked and I finally have a fix for this very annoying and persistent bug!

I've submitted a PR, and in the meantime it can manually be patched by copying my fork's keyring_linux.py to /usr/lib/python3/dist-packages/proton/keyring_linux/core/keyring_linux.py

from proton-vpn-gtk-app.

Anonymous941 avatar Anonymous941 commented on June 12, 2024

I will leave this issue open until the PR is merged upstream, @calexandru2018 can you take a look at it?

from proton-vpn-gtk-app.

Anonymous941 avatar Anonymous941 commented on June 12, 2024

Hey Anonymous941 thanks for the PR (and thank you Wizzerinus for taking your time in identifying and fixing the issue). I'll take this PR and discuss this internally with our team.

@calexandru2018 Mind taking a look at this again? I'd appreciate it :)

from proton-vpn-gtk-app.

Anonymous941 avatar Anonymous941 commented on June 12, 2024

Hey Anonymous941 thanks for the PR (and thank you Wizzerinus for taking your time in identifying and fixing the issue). I'll take this PR and discuss this internally with our team.

@calexandru2018 Any updates one month later?

from proton-vpn-gtk-app.

calexandru2018 avatar calexandru2018 commented on June 12, 2024

Hey all, could you please send issue reports through the app so we have some logs on this please ? I talked internally to our QA and we're a bit unsure why this is happening with gnome backend (can't reproduce on our side on gnome backends), it is expected with KDE as kwallet is a bit more tricky. Please refer to this ticket in the submission: #35

from proton-vpn-gtk-app.

calexandru2018 avatar calexandru2018 commented on June 12, 2024

Closing this and any further discussions should be on #30

from proton-vpn-gtk-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.