Skip to content

Commit c0a9089

Browse files
committed
[Security] Add 2 more Content-Security-Policy options
This adds to more CSP directives that are defined in CSP Level 3. (See: https://w3c.github.io/webappsec-csp/) `frame-ancestors: 'none'` prevents LORIS from being embedded in an iframe. This prevents the class of attacks where a third party embeds the page in an iframe, but covers it with an invisible div to intercept clicks or other interactions. `form-action: self` prevents forms from submitting data to a target that is off-site.
1 parent db58afb commit c0a9089

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

php/libraries/NDB_Client.class.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ class NDB_Client
129129
. "script-src 'self' 'unsafe-inline' 'unsafe-eval' $CaptchaDomains; "
130130
. "font-src 'self' data:; "
131131
. "img-src 'self' data:; "
132+
. "frame-ancestors 'none'; "
133+
. "form-action 'self'; "
132134
. $config_additions
133135
);
134136
// start php session

0 commit comments

Comments
 (0)