-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add CSP to help.expensify.com #15607
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
Conversation
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
|
@cristipaval Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
|
I have read the CLA Document and I hereby sign the CLA |
|
Sorry, this is my first APP pr, let me figure out the PR Author checklist. I'll comment when were ready for review. |
@nathanmetcalf Do you need any help here? |
Just trying to get it running locally so I can test it. I seem to have some version issues - I'll post them when I come back to this. |
|
@marcochavezf @roryabraham @cristipaval This is now ready for review, I managed to get it running locally, and all seems well :) |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromemobile.chrome.movMobile Web - Safarimobile.safari.movDesktopdesktop.moviOSios.native.movAndroidandroid.native.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/nathanmetcalf in version: 1.2.91-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.2.91-1 🚀
|
This PR adds a content security policy to help.expensify.com. This is using the http meta-equiv tag as we intend to implement this with a cloudflare worker as part of https://expensify.slack.com/archives/CC7NECV4L/p1670264158167419
Details
The only "fishy" thing going on here is using "style-src 'unsafe-inline'" this is required because we have style in .svg resources that we can't currently control. We intend on moving this to a 'nonce' as part of the CF implementation.
Fixed Issues
Fixes: https://github.com/Expensify/Expensify/issues/264123
Tests
Tested using CSP tester in chrome.

No CSP violations in console.
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
N/A help.expensify.com change only.