Problem on sending bulk pushes for real world apps
Nobody has claimed this yet.
- #234 by @ryancco — closed without merging
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start from the bulk flush path and the prepare/encrypt behavior described in the report. Reproduce a batch containing valid subscriptions and invalid public keys or tokens, then determine how failures are returned; done means valid pushes can proceed while invalid entries are identifiable for removal or handling.
Written by the indexing model from the issue text.
Description
NOTE: Please test in a least two browsers (i.e. Chrome and Firefox). This
helps with diagnosing problems quicker.
Please confirm the following:
- [X ] I have read the README entirely
- [ X] I have verified in the issues that my problem hasn't already been resolved
Setup
Please provide the following details, the more info you can provide the
better.
- Operating System:
- PHP Version: <7.2>
- web-push-php Version:
Please check that you have installed and enabled these PHP extensions :
- [X ] gmp
- [ X] mbstring
- [ X] curl
- [ X] openssl
Please select any browsers that you are experiencing problems with:
- [ X] Chrome
- [X ] Firefox
- [ X] Firefox for Mobile
- [ X] Opera for Android
- [X ] Samsung Internet Browser
- [X ] Other
Please specify the versions (i.e. Chrome Beta, Firefox Beta etc).
All Versions
Problem
Please explain what behaviour you are seeing.
When we send bulk webpushes (lets say 500 webpushes in 1 flush call) if any of the publickey or token is wrong it fails for all webpushes. When you get endpoint info from the browser some people can see the URL that you use to save the data on server side and they can add whatever they want.
Lets say a hacker added millions of fake endpoint or wrong public key or tokens to your system. So you also have many valid subscription data. It's impossible to send WebPushes even to valid subscriber in this case. You must find wrong public keys or auth keys manually and you must delete them manually from your db. It's impossible if you have millions of subscribers data.
Expected
I think WebPush library shouldn't throw any exception on prepare or encrypt method. It can silently add some info to the result and when we get result we can see the error and eliminate these fake data by adding some code like we do for expired endpoints.
Another option is you can add some methods like validate_endpoint_data and we can control the data using this method before adding it to db.
Please explain what you expected to happen
Features Used
- [ X] VAPID Support
- [X ] GCM API Key
- [X ] Sending with Payload
Example / Reproduce Case
Please provide a code sample that reproduces the issue. If there is a
repository that reproduces the issue please put the link here.
Other
Thanks :)
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 312
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from web-push-libs/web-push-php
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
web-push-libs/web-push-php#441 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
web-push-libs/web-push-php#430 · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
web-push-libs/web-push-php#429 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
web-push-libs/web-push-php#412 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
web-push-libs/web-push-php#411 · 5 comments ·
All issues in web-push-libs/web-push-php
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
backdrop-contrib/commerce#60 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
needs-triage Platform(Default)
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Feature-Request
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
RSS-Bridge/rss-bridge#5123 ·
Maintainers usually reply within 1 day
-
[Store] RstLoader detects headings inside indented code blocksPossibly taken @lazerg claimed this today. OpenBug Status: Needs Review Store
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day