Since Bug 15111, if you have JavaScript disabled the OPAC is broken. It only displays a blank page.
I use NoScript and Iceweasel 38.2.1 and the OPAC displays correctly.
I tested in Iceweasel by disabling JS via the the Web Developer Toolbar (http://chrispederick.com/work/web-developer/), but it also works to use about:config and set the javascript.enabled preference to "false." In Chromium I use an extension called "Quick Javascript Switcher." I can reproduce the problem in both.
Same comment as bug 15111 comment 33: Well, we have a problem. After reading this https://www.owasp.org/images/0/0e/OWASP_AppSec_Research_2010_Busting_Frame_Busting_by_Rydstedt.pdf it seems that it is not possible not to be vulnerable to XFS and render something with JS disabled...
If I understand correctly, setting X-Frame-Options to SAMEORIGIN should be enough for mordern browsers: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options The antiClickjack trick could be removed if we decide not to support them anymore.
(In reply to Jonathan Druart from comment #4) > If I understand correctly, setting X-Frame-Options to SAMEORIGIN should be > enough for mordern browsers: > https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options > > The antiClickjack trick could be removed if we decide not to support them > anymore. Supported are Firefox 3.6.9 September 2010 IE 8 March 2008 Opera 10.5 March 2010 Safari 4 February 2009 Chrome 4.1.… somewhen 2010 If that fixes the problem in general I vote for using it. One thing that needs to be checked if it works with recent mobile browsers, the website does not really say that.
Created attachment 50051 [details] [review] Bug 16210: Revert OPAC changes from Bug 15111 This patch reverts the changes made at the OPAC from the following patches: Do not include the antiClickjack legacy browser trick for greybox" Revert "Bug 15111: Do not include the antiClickjack legacy browser trick for greybox" This reverts commit fc640d2a86f395ad392f84314bce22e8b4dab1fe. Revert "Bug 15111: Change X-Frame-Options with SAMEORIGIN" This reverts commit fb167c0e4b897bf9a93b4fd6176b15e2d4dbd4df. Revert "Bug 15111 - Koha is vulnerable to Cross-Frame Scripting (XFS) attacks" This reverts commit dc03bca76cf5b7cb48d98d1ce245fc65b98be929. Setting X-Frame-Options to SAMEORIGIN is enough for mordern browsers: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options The antiClickjack trick should be removed at the OPAC as we want to keep the OPAC usable even if the user has disabled JS. That means the OPAC will be vulnerable to XFS if a user is navigating with a prehistoric browser: Firefox 3.6.9 September 2010 IE 8 March 2008 Opera 10.5 March 2010 Safari 4 February 2009 Chrome 4.1.… somewhen 2010 Test plan: Confirm that there are no regression of bug 15111 with modern browsers
Created attachment 50052 [details] [review] Bug 16210: Set X-Frame-Options to SAMEORIGIN in 2 other places The login page should not be displayed if the page is displayed in a frame.
Created attachment 50147 [details] [review] Bug 16210: Revert OPAC changes from Bug 15111 This patch reverts the changes made at the OPAC from the following patches: Do not include the antiClickjack legacy browser trick for greybox" Revert "Bug 15111: Do not include the antiClickjack legacy browser trick for greybox" This reverts commit fc640d2a86f395ad392f84314bce22e8b4dab1fe. Revert "Bug 15111: Change X-Frame-Options with SAMEORIGIN" This reverts commit fb167c0e4b897bf9a93b4fd6176b15e2d4dbd4df. Revert "Bug 15111 - Koha is vulnerable to Cross-Frame Scripting (XFS) attacks" This reverts commit dc03bca76cf5b7cb48d98d1ce245fc65b98be929. Setting X-Frame-Options to SAMEORIGIN is enough for mordern browsers: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options The antiClickjack trick should be removed at the OPAC as we want to keep the OPAC usable even if the user has disabled JS. That means the OPAC will be vulnerable to XFS if a user is navigating with a prehistoric browser: Firefox 3.6.9 September 2010 IE 8 March 2008 Opera 10.5 March 2010 Safari 4 February 2009 Chrome 4.1.… somewhen 2010 Test plan: Confirm that there are no regression of bug 15111 with modern browsers Signed-off-by: Marc Véron <veron@veron.ch>
Created attachment 50148 [details] [review] Bug 16210: Set X-Frame-Options to SAMEORIGIN in 2 other places The login page should not be displayed if the page is displayed in a frame. Signed-off-by: Marc Véron <veron@veron.ch>
This works for me to enable use of the OPAC without JavaScript, which I think is an important goal. I think we can rationalize the vulnerability for older browsers by saying "If you're still using one of these browsers you are probably vulnerable to any number of other terrible security problems because of your old computer and/or browser and what's one more?" I will leave it to someone who knows better than I to test whether this solves the security problem it's meant to fix.
(In reply to Owen Leonard from comment #10) > This works for me to enable use of the OPAC without JavaScript, which I > think is an important goal. > > I think we can rationalize the vulnerability for older browsers by saying > "If you're still using one of these browsers you are probably vulnerable to > any number of other terrible security problems because of your old computer > and/or browser and what's one more?" > > I will leave it to someone who knows better than I to test whether this > solves the security problem it's meant to fix. Yeah, it does what it should, and yep if you are running a 6 year old browser, chances are someone already is doing all your internet banking for you. Having someone put a hold on a book you don't want, is the least of your worries at that point. I think it is better to allow those who run without JS turned on (often for very legitimate reasons) to be able to use the OPAC. Than to try to support browsers from last decade.
Created attachment 50220 [details] [review] [PASSED QA] Bug 16210: Revert OPAC changes from Bug 15111 This patch reverts the changes made at the OPAC from the following patches: Do not include the antiClickjack legacy browser trick for greybox" Revert "Bug 15111: Do not include the antiClickjack legacy browser trick for greybox" This reverts commit fc640d2a86f395ad392f84314bce22e8b4dab1fe. Revert "Bug 15111: Change X-Frame-Options with SAMEORIGIN" This reverts commit fb167c0e4b897bf9a93b4fd6176b15e2d4dbd4df. Revert "Bug 15111 - Koha is vulnerable to Cross-Frame Scripting (XFS) attacks" This reverts commit dc03bca76cf5b7cb48d98d1ce245fc65b98be929. Setting X-Frame-Options to SAMEORIGIN is enough for mordern browsers: https://developer.mozilla.org/en-US/docs/Web/HTTP/X-Frame-Options The antiClickjack trick should be removed at the OPAC as we want to keep the OPAC usable even if the user has disabled JS. That means the OPAC will be vulnerable to XFS if a user is navigating with a prehistoric browser: Firefox 3.6.9 September 2010 IE 8 March 2008 Opera 10.5 March 2010 Safari 4 February 2009 Chrome 4.1.… somewhen 2010 Test plan: Confirm that there are no regression of bug 15111 with modern browsers Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 50221 [details] [review] [PASSED QA] Bug 16210: Set X-Frame-Options to SAMEORIGIN in 2 other places The login page should not be displayed if the page is displayed in a frame. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Pushed to Master - Should be in the May 2016 release. Thanks!
Patches pushed to 3.22.x, will be in 3.22.6
Pushed to 3.22.x, will be in 3.20.11.