Git Product home page Git Product logo

Comments (9)

marco-c avatar marco-c commented on July 16, 2024

In theory, one might want to run their push service. We could:

  • print a warning when an unknown push service is used;
  • add a parameter to sendNotification to block unknown push services.

from web-push.

jfbrennan avatar jfbrennan commented on July 16, 2024

In theory, one might want to run their push service.

If I understand you correctly, it's impossible to get a browser to subscribe to your own push service. PushManager.subscribe() internally calls the browser vendor's own private push service and you have no way of changing that.

from web-push.

marco-c avatar marco-c commented on July 16, 2024

In Firefox you can change it by setting some internal preferences. If you are a big organization who wants to have a private push service, you could do that.

from web-push.

jfbrennan avatar jfbrennan commented on July 16, 2024

Oh interesting. I'll pray for any org who goes down that path :)

from web-push.

marco-c avatar marco-c commented on July 16, 2024

It's not too complex, you "just" need to use an open source Web Push server like https://github.com/mozilla-services/autopush-rs/ and deploy it somewhere :)

from web-push.

khromov avatar khromov commented on July 16, 2024

This just adds an unnecessary time bomb to the library if any of the vendors decide to change their push service domain, or if any new vendors start to run their own services. If someone is this paranoid about security, it's better to whitelist it on the DNS layer.

from web-push.

marco-c avatar marco-c commented on July 16, 2024

Agreed!

from web-push.

jfbrennan avatar jfbrennan commented on July 16, 2024

Ok I understand the hesitation because things can and do change and you don't want to burden the library with that maintenance. To be fair, there's no "paranoia" here. Attacks have and will happen, like android.chromlum.info which was a malicious web push endpoint.

There's not a lot of good resources to help guard against this, perhaps this lib could simply add some info/resources in its docs?

from web-push.

marco-c avatar marco-c commented on July 16, 2024

I would accept a PR to do one or both of the things in #801 (comment).

from web-push.

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.