diff options
author | sualko <klaus@jsxc.org> | 2017-05-30 17:52:55 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2017-05-30 17:52:55 +0300 |
commit | 4f06de9f2568ad350d935896871e0a18257aa61f (patch) | |
tree | ba4e9edc3760a82e24eabf8f18954d07ca5bdf94 /build | |
parent | a83bcffff0af529b57d8d0f8a737e351c3900846 (diff) |
build v0.3.1v0.3.1
Diffstat (limited to 'build')
-rw-r--r-- | build/appinfo/app.php | 10 | ||||
-rw-r--r-- | build/appinfo/info.xml | 2 | ||||
-rw-r--r-- | build/appinfo/version | 2 | ||||
-rw-r--r-- | build/js/settings-admin.js | 4 | ||||
-rw-r--r-- | build/js/track.js | 4 |
5 files changed, 13 insertions, 9 deletions
diff --git a/build/appinfo/app.php b/build/appinfo/app.php index ce3f9df..7c1346a 100644 --- a/build/appinfo/app.php +++ b/build/appinfo/app.php @@ -16,12 +16,16 @@ if(class_exists('\\OCP\\AppFramework\\Http\\ContentSecurityPolicy')) { $piwik = json_decode(OCP\Config::getAppValue('piwik', 'piwik')); $url = parse_url($piwik->url, PHP_URL_HOST); - if (array_key_exists('HTTP_HOST', $_SERVER) && $_SERVER['HTTP_HOST'] !== $url) { - $policy = new OCP\AppFramework\Http\ContentSecurityPolicy (); + $policy = new OCP\AppFramework\Http\ContentSecurityPolicy (); + $policy->addAllowedScriptDomain('\'self\''); + $policy->addAllowedImageDomain('\'self\''); + + if ($url !== false && array_key_exists('HTTP_HOST', $_SERVER) && $_SERVER['HTTP_HOST'] !== $url) { $policy->addAllowedScriptDomain($url); $policy->addAllowedImageDomain($url); - \OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy); } + + \OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy); } OCP\Util::addScript ( 'piwik', 'track' ); diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml index eaa82a7..c0365e9 100644 --- a/build/appinfo/info.xml +++ b/build/appinfo/info.xml @@ -4,7 +4,7 @@ <name>Piwik Tracking</name> <summary>Track users with piwik</summary> <description>Track users with piwik</description> - <version>0.3.0</version> + <version>0.3.1</version> <licence>agpl</licence> <author>Klaus Herberth</author> <category>tools</category> diff --git a/build/appinfo/version b/build/appinfo/version index 0d91a54..9e11b32 100644 --- a/build/appinfo/version +++ b/build/appinfo/version @@ -1 +1 @@ -0.3.0 +0.3.1 diff --git a/build/js/settings-admin.js b/build/js/settings-admin.js index fbf73cd..19d081b 100644 --- a/build/js/settings-admin.js +++ b/build/js/settings-admin.js @@ -1,5 +1,5 @@ /*! - * owncloud_piwik v0.3.0 - 2017-05-29 + * owncloud_piwik v0.3.1 - 2017-05-30 * * Copyright (c) 2017 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see https://github.com/sualko/owncloud_piwik * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.3.0 + * @version 0.3.1 * @license MIT */ diff --git a/build/js/track.js b/build/js/track.js index d52af12..72915b0 100644 --- a/build/js/track.js +++ b/build/js/track.js @@ -1,5 +1,5 @@ /*! - * owncloud_piwik v0.3.0 - 2017-05-29 + * owncloud_piwik v0.3.1 - 2017-05-30 * * Copyright (c) 2017 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see https://github.com/sualko/owncloud_piwik * * @author Klaus Herberth <klaus@jsxc.org> - * @version 0.3.0 + * @version 0.3.1 * @license MIT */ |