Skip to content
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

Public calendar iframe has issues on some browsers #169

Closed
tcitworld opened this issue Nov 7, 2016 · 52 comments
Closed

Public calendar iframe has issues on some browsers #169

tcitworld opened this issue Nov 7, 2016 · 52 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug
Milestone

Comments

@tcitworld
Copy link
Member

tcitworld commented Nov 7, 2016

OS Linux Windows
Firefox Works Works
Chrome 54 Displays the grid, not the events. When refreshed, redirect issue. Displays the grid, not the events. When refreshed, redirect issue.
Chromium 53 Works Not tested
Chromium 54 Not tested Displays the grid, not the events. When refreshed, redirect issue.
Edge Not available Works
IE 12 Not available Displays the grid, not the events

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@tcitworld tcitworld added the bug label Nov 7, 2016
@tcitworld tcitworld self-assigned this Nov 7, 2016
@tcitworld
Copy link
Member Author

@georgehrke Can you test on Safari ?

@tcitworld
Copy link
Member Author

The Chrome error is ERR_TOO_MANY_REDIRECTS

@georgehrke georgehrke added this to the 1.5.0-current milestone Nov 29, 2016
@georgehrke
Copy link
Member

@tcitworld Do you have some example code for me?
Did you just include the iframe into an otherwise blank html file?

@georgehrke georgehrke added the 1. to develop Accepted and waiting to be taken care of label Dec 6, 2016
@georgehrke
Copy link
Member

ping @tcitworld ^ :)

@tcitworld
Copy link
Member Author

tcitworld commented Dec 17, 2016

For instance this one works with Firefox and Chromium but not Chrome on Linux : http://www.berrylab36.org/Ouverture

Here it's embeed within SPIP but I've heard of the same issue with a Wordpress. Will try myself.

@georgehrke
Copy link
Member

Safari 10 on macOS works just fine for me.

@georgehrke
Copy link
Member

planning d ouverture - berrylab36 chromium today at 8 45 44 am

planning d ouverture - berrylab36 chromium today at 8 56 09 am

planning d ouverture - berrylab36 chromium today at 8 47 24 am

I see a few issues here.
To my knowledge there is no X-FRAME-OPTIONS: ALLOW. There is only DENY, SAMEORIGIN and ALLOW-FROM https://...

Further Chrom(e|ium) doesn't support X-Frame-Options.
It expects something like Content-Security-Policy: frame-ancestors my-trusty-site.com
Source: https://www.owasp.org/index.php/Content_Security_Policy_Cheat_Sheet#Preventing_Clickjacking

Also Chrom(e|ium) got more strict about https lately.
Maybe it's related to the fact, the berrylab36.org is http, but framagenda.org is https. (at least when sending requests like PROPFIND or so)

Maybe @LukasReschke has more insights here

@georgehrke
Copy link
Member

IE doesn't work for the same reason the calendar app itself doesn't work in Internet explorer.

Should we display some overlay asking the user to use a different webbrowser?

@tcitworld
Copy link
Member Author

I guess this needs some tweaking.

@tcitworld
Copy link
Member Author

Will see how nextcloud/server#1472 handles things.

@georgehrke georgehrke modified the milestones: 1.6.0-next, 1.5.0-current Jan 16, 2017
@enoch85
Copy link
Member

enoch85 commented Mar 12, 2017

I can confirm this. Got redirected to many times Chrome version 56.0.2924.87 (64-bit)

@enoch85
Copy link
Member

enoch85 commented Mar 12, 2017

Maybe my Ǹextcloud is to secure?

Firefox

Load denied by X-Frame-Options: https://cloud.techandme.se/apps/calendar/public/G1ZXEIKC3AGL8X4S does not permit cross-origin framing.

@georgehrke
Copy link
Member

Maybe @LukasReschke has more insights here

@LukasReschke ping :)

@georgehrke
Copy link
Member

IE doesn't work for the same reason the calendar app itself doesn't work in Internet explorer.
Should we display some overlay asking the user to use a different webbrowser?

At least IE 11 should be fixed by now

@flips
Copy link

flips commented Mar 21, 2017

Seeing the same " redirected you too many times" in both Opera 43.0.2442.1165 and Chrome 57.0.2987.110. In Firefox 52.0.1 only seeing blank iframe. (macOS 10.12, all 64 bit browsers)

@georgehrke
Copy link
Member

We don't support Opera. Will definitely look into the Chrome and Firefox issue

@flips
Copy link

flips commented Mar 21, 2017

When I used http://www.tinywebgallery.com/blog/advanced-iframe/free-iframe-checker
it also complained about the X-FRAME-OPTIONS ... (As mentioned previously here)
Placing my test.html file on the same domain as my NextCloud installation, the iFrame started working in Firefox, but not in Safari (10.0.3) or Chrome (where they are now both blank, I don't get the framing or anything, and not the same too many redirects error).

@georgehrke
Copy link
Member

This requires changes to the Nextcloud server, to be released with Nextcloud 12.
Rescheduling this ticket to Calendar 1.7.0

@law
Copy link

law commented Aug 1, 2017

Still seeing this issue on Nextcloud 12 and Chrome. tl; dr - firefox and safari work, Chrome throws a redirect error.

@haug-den-lucas
Copy link

haug-den-lucas commented Jan 28, 2018

Error still exists.
I'd really love to add the iframe to my webpage, but sadly it still doesn't work.
Any fixes or workarounds?

@georgehrke
Copy link
Member

@Ich5003 What Browser, Nextcloud version, calendar app version?

@tcitworld
Copy link
Member Author

Thanks to nextcloud/server#11433 we should be good with NC15.

@rullzer
Copy link
Member

rullzer commented Oct 2, 2018

Yes you should.
Would be good of course if somebody coould setup a test server and test it 😉

@tcitworld
Copy link
Member Author

@rullzer I tested and we're still blocked by https://github.com/nextcloud/server/blob/master/lib/private/AppFramework/Middleware/Security/SameSiteCookieMiddleware.php#L60-L61 which triggers 302s for every request.

@rullzer
Copy link
Member

rullzer commented Oct 16, 2018

Ah ok. So the check I had in mind doesn't fully work. As that would with the current logic log you out of your nextcloud if you embed a page.

Thinking more this would need a few adjustments

  1. calendar endpoint must of course be marked with @NoSameSiteCookieRequired
  2. The css and js endpoint should be marked as such I don't think this hurts as this is public info anyway
  3. The theming endpoints should be marked as such. Also should not be that much of an issue as they just serve generic theming info

@tcitworld
Copy link
Member Author

Works perfectly ! Will send PRs. :)

tcitworld added a commit that referenced this issue Oct 17, 2018
Fixes #169 (will probably require NC 15 though)

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
tcitworld added a commit to nextcloud/server that referenced this issue Oct 17, 2018
Which can be used for public iframe embeeding

See nextcloud/calendar#169

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
weeman1337 pushed a commit to nextcloud/server that referenced this issue Oct 28, 2018
Which can be used for public iframe embeeding

See nextcloud/calendar#169

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@georgehrke georgehrke reopened this Oct 25, 2019
@pReya

This comment has been minimized.

@ghost

This comment has been minimized.

@FredMa01
Copy link

FredMa01 commented Feb 19, 2020

Same issue. Embed code generate this error :`

The page is not redirected correctly
An error occurred while connecting to framagenda.org.
The cause of this problem can be the deactivation or refusal of cookies.

@fpoulain
Copy link

fpoulain commented Apr 2, 2020

Using the embed link on a recent NC 18, I am receiving

Content-Security-Policy: ... 'self';frame-ancestors 'self'; ...

Consequently Firefox block the content loading, even from a parent domain (X-Frame-Option is ignored when CSP is defined). Afaik there is no option in NC to define a « trusted embeder ». Moreover, may be the embed link should allow anyone to embed.

I overcame the situation by munging Content-Security-Policy by this kludge on my reverse proxy:

       location / {
               proxy_pass http://xxx.xxx.xxx.xxx;
               location /nextcloud/apps/calendar/embed/ {
                       proxy_pass http://xx.xx.xx.xx;
                       proxy_hide_header Content-Security-Policy;
                       add_header Content-Security-Policy "frame-ancestors 'self' https://ourwebsite.com https://www.ourwebsite.com";
               }
       }

@rullzer
Copy link
Member

rullzer commented Apr 2, 2020

A fixis already in master. and will be in the next release.
CC: @georgehrke

@nd-
Copy link

nd- commented Jun 9, 2020

Hello, NC 18.0.6 and I still have this problem.
Is it supposed to be fixed with the latest releases ?

I even added the headers mentionned by @fpoulain (Content-Security-Policy "frame-ancestors 'self' https://ourwebsite.com") but nada...

@nderambure
Copy link

Same here.

@georgehrke
Copy link
Member

It should work on Nextcloud 19. There are known issues with Nextcloud 18 and below.

@nd-
Copy link

nd- commented Jun 9, 2020

I updated to NC 19 (on the beta channel), it still doesn't work.

With Chrome, I still see these errors in the console coming from the calendar url when I browse the page with an iframe:
Failed to load resource: the server responded with a status of 503 (Service Unavailable)
Failed to load resource: net::ERR_TOO_MANY_REDIRECTS

@gelmio
Copy link

gelmio commented Sep 21, 2020

It should work on Nextcloud 19. There are known issues with Nextcloud 18 and below.

We updated to NC19 and still have the same issue; firefox requests still returning a 503; chrome is fine.

@ashnansen
Copy link

There are also a problem with embeding it in wordpress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug
Projects
None yet
Development

No branches or pull requests