Fossil SCM

Change X-Frame-Options to SAMEORIGIN to give reasonable click-jacking protection without blocking some client side scripting currently in use by some fossil users.

ben 2011-08-10 15:54 trunk
Commit b968f023a88a6af5c7bcb6e499c42e3173a8e32e
1 file changed +1 -1
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -295,11 +295,11 @@
295295
if( blob_size(&extraHeader)>0 ){
296296
fprintf(g.httpOut, "%s", blob_buffer(&extraHeader));
297297
}
298298
299299
/* Add headers to turn on useful security options in browsers. */
300
- fprintf(g.httpOut, "X-Frame-Options: DENY\r\n");
300
+ fprintf(g.httpOut, "X-Frame-Options: SAMEORIGIN\r\n");
301301
/* This stops fossil pages appearing in frames or iframes, preventing
302302
** click-jacking attacks on supporting browsers.
303303
**
304304
** Other good headers would be
305305
** Strict-Transport-Security: max-age=62208000
306306
--- src/cgi.c
+++ src/cgi.c
@@ -295,11 +295,11 @@
295 if( blob_size(&extraHeader)>0 ){
296 fprintf(g.httpOut, "%s", blob_buffer(&extraHeader));
297 }
298
299 /* Add headers to turn on useful security options in browsers. */
300 fprintf(g.httpOut, "X-Frame-Options: DENY\r\n");
301 /* This stops fossil pages appearing in frames or iframes, preventing
302 ** click-jacking attacks on supporting browsers.
303 **
304 ** Other good headers would be
305 ** Strict-Transport-Security: max-age=62208000
306
--- src/cgi.c
+++ src/cgi.c
@@ -295,11 +295,11 @@
295 if( blob_size(&extraHeader)>0 ){
296 fprintf(g.httpOut, "%s", blob_buffer(&extraHeader));
297 }
298
299 /* Add headers to turn on useful security options in browsers. */
300 fprintf(g.httpOut, "X-Frame-Options: SAMEORIGIN\r\n");
301 /* This stops fossil pages appearing in frames or iframes, preventing
302 ** click-jacking attacks on supporting browsers.
303 **
304 ** Other good headers would be
305 ** Strict-Transport-Security: max-age=62208000
306

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button