Giter VIP home page Giter VIP logo

Comments (17)

JJTech0130 avatar JJTech0130 commented on September 16, 2024 1

Merely my own personal project, not on paid time for Beeper. (and occasionally because it's easier to experiment with new features in python)

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

You mean these ones?

from pypush.

JJTech0130 avatar JJTech0130 commented on September 16, 2024

Yep!

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

Well, lemme work on it I'll PR real quick.

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

Well, one domain that causes some trouble, is init-p01st.push.apple.com.
The problem is, the hostname is not in the certificate hostnames:

$ openssl x509 -in init-p01st.push.apple.com.pem -noout -subject
subject=C = US, ST = Massachusetts, L = Cambridge, O = "Akamai Technologies, Inc.", CN = a248.e.akamai.net

Which of-course doesn't match the hostname. Hence, I don't think there is an option to actually verify the connection, as the certificate is just wrong.

from pypush.

TheTechRobo avatar TheTechRobo commented on September 16, 2024

You could still technically verify it, since it is a valid certificate (just for a different hostname), but probably not with Requests. Or am I missing something?

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

Well, yes, without requests, it will be in some way possible, maybe using urllib3. But currently the program uses requests so I don't know if we can use urllib3.

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

I can currently push a PR for only specific domains, but there will be a couple with verify=False.

from pypush.

JJTech0130 avatar JJTech0130 commented on September 16, 2024

Honestly, I'm kind of thinking that maybe it's better to leave pypush with verify=False, or at least leave a global "DEBUG" option. It's quite useful for debugging to be able to simply mitm the connection. I don't think anyone is really going to be using pypush in an environment where this is a concern?

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

Well I guess pypush is a demo program, so maybe you're right. But if pypush is going to be used as a base of something better, it's important to make security is at its best.

from pypush.

SpaceSaver avatar SpaceSaver commented on September 16, 2024

Well I guess pypush is a demo program, so maybe you're right. But if pypush is going to be used as a base of something better, it's important to make security is at its best.

That is Beeper's plan

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

Then I believe verifying certs should be implemented, at least partially.

from pypush.

SpaceSaver avatar SpaceSaver commented on September 16, 2024

Then I believe verifying certs should be implemented, at least partially.

We should find where Apple devices get the certs.

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

They're already been found. Apple probably verifies the certificates without hostname checks or in another way.

from pypush.

TaeHagen avatar TaeHagen commented on September 16, 2024

Beeper is rewriting pypush in GO, so they can do that there.

If you want to pin the certs, I've already done that in rustpush, look in https://github.com/TaeHagen/rustpush/tree/master/certs/root. All the certs you will need are there.

For the APNs connection, you have to validate the cert against a different hostname (without the number prefix). I do that in rust, not sure how the API's work in python.

from pypush.

dd-dreams avatar dd-dreams commented on September 16, 2024

Then why are commits still being pushed?

from pypush.

JJTech0130 avatar JJTech0130 commented on September 16, 2024

I think I'm going to just close this issue. Not pinning certificates actually makes it much easier for development, and this isn't meant to be used in production. Will be revisited if/when this ever gets pushed to pypi.

from pypush.

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.