8000 Apple-Pay and Google-Pay CSP & Manifest Download errors · Issue #10751 · Automattic/woocommerce-payments · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Apple-Pay and Google-Pay CSP & Manifest Download errors #10751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Everade opened this issue May 6, 2025 · 3 comments
Open

Apple-Pay and Google-Pay CSP & Manifest Download errors #10751

Everade opened this issue May 6, 2025 · 3 comments
Assignees
Labels
status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: bug The issue is a confirmed bug.

Comments

@Everade
Copy link
Everade commented May 6, 2025

Describe the bug

When loading a page with Apple-Pay and Google-Pay buttons, there are seamingly Content Security Policy errors due to Apple-Pay and Google-Pay enforcing false hashes. As well as Manifest download errors.

To Reproduce

Enable Apple-Pay and Google-Pay as payment options.
Visit the checkout page and take a look at your console logs.

  1. Make sure Apple-Pay and Google-Pay payment options are enabled
  2. Go to the Checkout Page
  3. Press F12 to open your browser dev tools
  4. Navigate to the Browser Console logs, and see if there are any errors

Actual behavior

Constantly having over 300 Content Security Policy errors on a single page load isn't good. As the 3rd party websites apply sha256 hashes, we can't use "unsafe-inline" either to workaround these errors. And setting up the content policy for these specific hashes isn't a good solution either, as we never know when they will change.

Example of some of the Content Security Police Errors:
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'sha256-zhyeDlZTEKZvKgtxHpxj4ydFABucKb8zpjZLFzOborc=' 'sha256-leLzbVxZAzOi3vU/QL+Ol4qnwxlwA0nSPFZDP71A4Kk=' 'sha256-mQ4LZTkAl1QYJkeyaT4nVx0YDeQ9WOH9k4ajt5PFvNU=' 'sha256-B3yoUHRULn1isE4VCTQnLT04X7QKzhw+FhvpPPZfR/w='". Either the 'unsafe-inline' keyword, a hash ('sha256-leLzbVxZAzOi3vU/QL+Ol4qnwxlwA0nSPFZDP71A4Kk='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present.

Manifest Errors:
Unable to download payment manifest "https://www.google.com/pay". Unable to download payment manifest "https://www.google.com/pay". Unable to download payment manifest "https://pay.google.com/gp/p/payment_method_manifest.json". Unable to download payment manifest "https://pay.google.com/gp/p/web_manifest.json".

Screenshots

Image
Image

Expected behavior

  • No Content Security Policy errors.
  • No "unable to download payment manifest" errors

Desktop:

  • OS: Windows 11
  • Browser: Chrome
  • Version: 136.0.7103.48 (Official Build) (64-bit)

Additional context

I've been trying to get these sorted out, but never managed to do so. Unfortunately i'm not experienced enough to know if these issues are caused by my Setup or WooPay. But it appears to me as if at least the Content Security Policy errors shouldn't be caused in the first place. For now i will try to add these hashes to my CSP and hope they don't change anytime soon.

@Everade Everade added the type: bug The issue is a confirmed bug. label May 6, 2025
@frosso
Copy link
Contributor
frosso commented May 9, 2025

Hi @Everade ! 👋 I reached out to Stripe directly about this. They replied:

The team responsible is going to work on it. FYI these CSP errors are only for inline styles from Apple Pay JS SDK. They don't affect the functionality of the button.

For internal reference: p1744788912173279-slack-C9976E5MJ

@frosso frosso added the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label May 9, 2025
@Automattic Automattic deleted a comment from Kashcd May 13, 2025
Copy link
Contributor
dmvrtx commented May 16, 2025

Just to note, that this is related to the Apple Pay on the non-Safari browser - a totally new feature from Apple and Stripe, which is still in experimental stage.

@Everade
Copy link
Author
Everade commented May 21, 2025

Just to note, that this is related to the Apple Pay on the non-Safari browser - a totally new feature from Apple and Stripe, which is still in experimental stage.

If Apple Pay and/or Google Pay are currently in an experimental or beta stage, wouldn't it be appropriate to inform users of that status? As it stands, neither the documentation nor the toggle to enable these features indicates that they are incomplete or under development. Additionally, please note that there are logged CSP style errors as well as manifest download errors with Google Pay as well, not just Apple Pay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

3 participants
0