Commit 7d9a58d9 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5842-security-missing-security-headers' into '1.3-dev'

Resolve "Security: Missing Security Headers"

See merge request fusiondirectory/fd!303
Showing with 12 additions and 0 deletions
+12 -0
...@@ -104,6 +104,8 @@ class standAlonePage { ...@@ -104,6 +104,8 @@ class standAlonePage {
load_plist(); load_plist();
$ssl = $this->checkForSSL(); $ssl = $this->checkForSSL();
static::securityHeaders();
} }
} }
...@@ -222,6 +224,13 @@ class standAlonePage { ...@@ -222,6 +224,13 @@ class standAlonePage {
return $params; return $params;
} }
static function securityHeaders()
{
header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff');
header('X-Frame-Options: deny');
}
static function generateRandomHash() static function generateRandomHash()
{ {
/* Generate a very long random value */ /* Generate a very long random value */
......
...@@ -29,6 +29,7 @@ require_once ("class_logging.inc"); ...@@ -29,6 +29,7 @@ require_once ("class_logging.inc");
header('Content-type: text/html; charset=UTF-8'); header('Content-type: text/html; charset=UTF-8');
header('X-XSS-Protection: 1; mode=block'); header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff'); header('X-Content-Type-Options: nosniff');
header('X-Frame-Options: deny');
/* Display the login page and exit() */ /* Display the login page and exit() */
function displayLogin() function displayLogin()
......
...@@ -31,6 +31,7 @@ require_once ("variables.inc"); ...@@ -31,6 +31,7 @@ require_once ("variables.inc");
header('Content-type: text/html; charset=UTF-8'); header('Content-type: text/html; charset=UTF-8');
header('X-XSS-Protection: 1; mode=block'); header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff'); header('X-Content-Type-Options: nosniff');
header('X-Frame-Options: deny');
/* Set the text domain as 'fusiondirectory' */ /* Set the text domain as 'fusiondirectory' */
$domain = 'fusiondirectory'; $domain = 'fusiondirectory';
......
...@@ -39,6 +39,7 @@ require_once("../setup/class_setupStepFinish.inc"); ...@@ -39,6 +39,7 @@ require_once("../setup/class_setupStepFinish.inc");
header('Content-type: text/html; charset=UTF-8'); header('Content-type: text/html; charset=UTF-8');
header('X-XSS-Protection: 1; mode=block'); header('X-XSS-Protection: 1; mode=block');
header('X-Content-Type-Options: nosniff'); header('X-Content-Type-Options: nosniff');
header('X-Frame-Options: deny');
/* Set cookie lifetime to one day (The parameter is in seconds ) */ /* Set cookie lifetime to one day (The parameter is in seconds ) */
session_set_cookie_params(24 * 60 * 60); session_set_cookie_params(24 * 60 * 60);
......
  • bmortier @bmortier

    mentioned in commit ab144d73

    By Côme Chilliet on 2018-06-26T10:12:22 (imported from GitLab)

    ·

    mentioned in commit ab144d73

    By Côme Chilliet on 2018-06-26T10:12:22 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in merge request !306

    By Côme Chilliet on 2018-06-26T10:12:35 (imported from GitLab)

    ·

    mentioned in merge request !306

    By Côme Chilliet on 2018-06-26T10:12:35 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in commit f7b3d318

    By Côme Chilliet on 2018-06-26T10:21:38 (imported from GitLab)

    ·

    mentioned in commit f7b3d318

    By Côme Chilliet on 2018-06-26T10:21:38 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in commit 4812baa1

    By Côme Chilliet on 2018-06-26T10:51:55 (imported from GitLab)

    ·

    mentioned in commit 4812baa1

    By Côme Chilliet on 2018-06-26T10:51:55 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in merge request !308

    By Côme Chilliet on 2018-06-26T10:53:28 (imported from GitLab)

    ·

    mentioned in merge request !308

    By Côme Chilliet on 2018-06-26T10:53:28 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in commit 3e6c668a

    By Côme Chilliet on 2018-06-26T10:58:52 (imported from GitLab)

    ·

    mentioned in commit 3e6c668a

    By Côme Chilliet on 2018-06-26T10:58:52 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in commit e52d5156

    By Côme Chilliet on 2020-06-11T14:33:27 (imported from GitLab)

    ·

    mentioned in commit e52d5156

    By Côme Chilliet on 2020-06-11T14:33:27 (imported from GitLab)

    Toggle commit list
  • bmortier @bmortier

    mentioned in merge request !784

    By bmortier on 2020-06-11T14:33:35 (imported from GitLab)

    ·

    mentioned in merge request !784

    By bmortier on 2020-06-11T14:33:35 (imported from GitLab)

    Toggle commit list
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment