by hdhzy · 9y ago · 0 comments
If jQuery is compromised you'll detect it and download from different location but for stripe there is no fallback.
If they want you to stay up-to-date, they'll provide a piece of PHP/Node that emits the latest URL/SRI tag.
Stripe rolls out a fix for a security issue or other bug in their JS. This breaks your subresource-integrity check. The didn't want you to stop accepting payments, they wanted to fix a vuln.
That hampers the usefulness of using subresource-integrity on 3rd-party resources today (which is what yeldarb suggested). Perhaps in the future the 3rd party would provide a script that emits the URL/SRI, but that isn't today.
the 3rd party would provide a script that emits the URL/SRI
And we're back to square one - we can't trust _that_ script to not get pwnedYou might break payment for $polling_interval if the script is incompatible with Stripe's server, so perhaps you could have retry logic there, to bridge $polling_interval more smoothly.
You could also manually review the new Stripe code this way, by polling only by hand or by not automatically updating the cache and SRI.
Then how do you verify the integrity the integrity for the tag?