sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Content Security Policy errors in Safari

Open justdevelopment opened this issue 7 years ago • 13 comments

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

For Safari to work without 50+ errors :)

Observed Behavior

When loading a modern page from SPO Safari gives a ton of errors regarding Content Security Policy. We've seen this issue in the past but it was fixed. As of this morning it seems to have returned on at least 3 separate tenants (we can send tenant URL if wanted).

image

~~I also experience issues login into ms-graph-client on SPFx, but I'm not sure if this issue is related as my coworker can login just fine using his Mac + Safari. I get an error AADSTS50058, but it loads fine using Private? Just adding in case it is related.~~ Nevermind, this has been solved. Main issue remains.

Steps to Reproduce

Login to your favorite SPO tenant, navigate to the SharePoint landing page and open the Web Inspector.

justdevelopment avatar Jun 12 '19 14:06 justdevelopment

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Jun 12 '19 14:06 msft-github-bot

Well that's a bit weird. Can you look at the response headers of the main page and see what the CSP report header policy is and paste it here?

patmill avatar Jun 12 '19 18:06 patmill

I see the same in Safari.

Content-Security-Policy-Report-Only: script-src 'strict-dynamic' 'unsafe-eval' 'nonce-afde21ba-1ce4-48c1-b377-2174f30ff367' ; report-uri https://splst.sharepoint.com/sites/SPHubDiscussions/_layouts/15/CSPReporting.aspx

AJIXuMuK avatar Jun 12 '19 23:06 AJIXuMuK

OK - so it makes sense that the report would fire, since Safari apparently has no idea what CSP3 is. The strange this is why would you only notice it now (unless safari rolled out then rolled back support). I'm currently working on updating the CSP code, so I'll make note of Safari (and IE) getting confused.

patmill avatar Jun 12 '19 23:06 patmill

@patmill - from my side - I open Safari dev tools once in few months :) So I noticed it after reading this issue :)

AJIXuMuK avatar Jun 12 '19 23:06 AJIXuMuK

I see the same CSP as Alex, no change yet, glad that it at least makes sense :)

I also don't really use Safari as my daily dev browser, I noticed it yesterday because I got some other bug reports that needed looking into. I was seeing the issue in Safari 12.1 and it remains after updating to 12.1.1

Thanks for the quick reply btw!

justdevelopment avatar Jun 13 '19 06:06 justdevelopment

@patmill Any chance for an ETA on this? The issue still occurs and I would like to know what to tell our customers :)

justdevelopment avatar Jul 09 '19 15:07 justdevelopment

same problem here, using Safari as default browser for all users, lots of pages not loading properly. For instance modern site contents pages remain blank, file viewer web parts not working with Word or PDF files.

Gmeeler avatar Aug 07 '19 10:08 Gmeeler

Any updates on this? I am also seeing many content security errors!! I get around 50.

tritter avatar Aug 12 '19 09:08 tritter

Any updates, please? I'm also seeing many content security policy errors. I'm also experiencing an issue where the SPFx web parts using the Office Graph API are not working in Safari and I wonder if this is related?

DaniCorretja avatar Sep 05 '19 09:09 DaniCorretja

SPFx web parts are working for us in Safari but there are still a lot of Content Security Policy errors. Any updates please?

MRuimerman avatar Sep 12 '19 09:09 MRuimerman

This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open or submit a new issue.

ghost avatar Dec 29 '21 15:12 ghost

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

ghost avatar Jan 06 '22 00:01 ghost