From 6d72800098867bd6f52cbea39140abdf93d3c6dd Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sun, 3 May 2015 22:50:44 +0200 Subject: [PATCH] StrictTransportSecurity syntax fix --- .../StrictTransportSecurityPlugin.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php b/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php index 682b10cad2..91747f1543 100644 --- a/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php +++ b/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php @@ -27,9 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } class StrictTransportSecurityPlugin extends Plugin { @@ -45,7 +43,8 @@ class StrictTransportSecurityPlugin extends Plugin { $path = common_config('site', 'path'); if(common_config('site', 'ssl') == 'always' && ($path == '/' || ! $path )) { - header('Strict-Transport-Security: max-age=' . $this->max_age . + ($this->includeSubDomains?'; includeSubDomains':'')); + header('Strict-Transport-Security: max-age=' . $this->max_age + . ($this->includeSubDomains ? '; includeSubDomains' : '')); } } -- 2.39.5