diff options
author | Andreas Fischer <bantu@owncloud.com> | 2013-08-21 10:52:22 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2013-08-21 10:52:22 +0200 |
commit | 9753e44ac2352d181417dfea2781f5d4df5f7b47 (patch) | |
tree | 569ae0882448c9224aefd6041b0a00dbc97bd102 /apps/files_encryption | |
parent | 12f4494de02457d51004ca6a82c1b2160189819f (diff) | |
download | nextcloud-server-9753e44ac2352d181417dfea2781f5d4df5f7b47.tar.gz nextcloud-server-9753e44ac2352d181417dfea2781f5d4df5f7b47.zip |
Do not use realpath() on includes.
If the file does not exist, realpath() returns false and "include false;"
produces "Failed opening '' for inclusion" which is a useless error message.
'include' works just fine with symlinks, "./" and "../".
Diffstat (limited to 'apps/files_encryption')
-rwxr-xr-x | apps/files_encryption/lib/crypt.php | 2 | ||||
-rwxr-xr-x | apps/files_encryption/tests/crypt.php | 20 | ||||
-rw-r--r-- | apps/files_encryption/tests/keymanager.php | 18 | ||||
-rwxr-xr-x | apps/files_encryption/tests/share.php | 20 | ||||
-rw-r--r-- | apps/files_encryption/tests/stream.php | 16 | ||||
-rwxr-xr-x | apps/files_encryption/tests/trashbin.php | 18 | ||||
-rwxr-xr-x | apps/files_encryption/tests/util.php | 14 | ||||
-rwxr-xr-x | apps/files_encryption/tests/webdav.php | 16 |
8 files changed, 62 insertions, 62 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 3947b7d0c3b..47801252bbd 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -25,7 +25,7 @@ namespace OCA\Encryption;
-require_once realpath(dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php');
+require_once dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php';
/**
* Class for common cryptography functionality
diff --git a/apps/files_encryption/tests/crypt.php b/apps/files_encryption/tests/crypt.php index 2330a45be84..a4bb3054efe 100755 --- a/apps/files_encryption/tests/crypt.php +++ b/apps/files_encryption/tests/crypt.php @@ -7,16 +7,16 @@ * See the COPYING-README file. */ -require_once realpath(dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php'); -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../lib/helper.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); -require_once realpath(dirname(__FILE__) . '/util.php'); +require_once dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php'; +require_once dirname(__FILE__) . '/../../../lib/base.php'; +require_once dirname(__FILE__) . '/../lib/crypt.php'; +require_once dirname(__FILE__) . '/../lib/keymanager.php'; +require_once dirname(__FILE__) . '/../lib/proxy.php'; +require_once dirname(__FILE__) . '/../lib/stream.php'; +require_once dirname(__FILE__) . '/../lib/util.php'; +require_once dirname(__FILE__) . '/../lib/helper.php'; +require_once dirname(__FILE__) . '/../appinfo/app.php'; +require_once dirname(__FILE__) . '/util.php'; use OCA\Encryption; diff --git a/apps/files_encryption/tests/keymanager.php b/apps/files_encryption/tests/keymanager.php index 13f8c3197c7..6e8b7f2ff0a 100644 --- a/apps/files_encryption/tests/keymanager.php +++ b/apps/files_encryption/tests/keymanager.php @@ -6,15 +6,15 @@ * See the COPYING-README file. */ -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../lib/helper.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); -require_once realpath(dirname(__FILE__) . '/util.php'); +require_once dirname(__FILE__) . '/../../../lib/base.php'; +require_once dirname(__FILE__) . '/../lib/crypt.php'; +require_once dirname(__FILE__) . '/../lib/keymanager.php'; +require_once dirname(__FILE__) . '/../lib/proxy.php'; +require_once dirname(__FILE__) . '/../lib/stream.php'; +require_once dirname(__FILE__) . '/../lib/util.php'; +require_once dirname(__FILE__) . '/../lib/helper.php'; +require_once dirname(__FILE__) . '/../appinfo/app.php'; +require_once dirname(__FILE__) . '/util.php'; use OCA\Encryption; diff --git a/apps/files_encryption/tests/share.php b/apps/files_encryption/tests/share.php index 5f3d5005090..7f68ecd388a 100755 --- a/apps/files_encryption/tests/share.php +++ b/apps/files_encryption/tests/share.php @@ -20,16 +20,16 @@ * */ -require_once realpath(dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php'); -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../lib/helper.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); -require_once realpath(dirname(__FILE__) . '/util.php'); +require_once dirname(__FILE__) . '/../3rdparty/Crypt_Blowfish/Blowfish.php'; +require_once dirname(__FILE__) . '/../../../lib/base.php'; +require_once dirname(__FILE__) . '/../lib/crypt.php'; +require_once dirname(__FILE__) . '/../lib/keymanager.php'; +require_once dirname(__FILE__) . '/../lib/proxy.php'; +require_once dirname(__FILE__) . '/../lib/stream.php'; +require_once dirname(__FILE__) . '/../lib/util.php'; +require_once dirname(__FILE__) . '/../lib/helper.php'; +require_once dirname(__FILE__) . '/../appinfo/app.php'; +require_once dirname(__FILE__) . '/util.php'; use OCA\Encryption; diff --git a/apps/files_encryption/tests/stream.php b/apps/files_encryption/tests/stream.php index 50ac41e4536..adc0d1959a0 100644 --- a/apps/files_encryption/tests/stream.php +++ b/apps/files_encryption/tests/stream.php @@ -20,14 +20,14 @@ * */ -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); -require_once realpath(dirname(__FILE__) . '/util.php'); +require_once dirname(__FILE__) . '/../../../lib/base.php'; +require_once dirname(__FILE__) . '/../lib/crypt.php'; +require_once dirname(__FILE__) . '/../lib/keymanager.php'; +require_once dirname(__FILE__) . '/../lib/proxy.php'; +require_once dirname(__FILE__) . '/../lib/stream.php'; +require_once dirname(__FILE__) . '/../lib/util.php'; +require_once dirname(__FILE__) . '/../appinfo/app.php'; +require_once dirname(__FILE__) . '/util.php'; use OCA\Encryption; diff --git a/apps/files_encryption/tests/trashbin.php b/apps/files_encryption/tests/trashbin.php index ade968fbece..55ec94782eb 100755 --- a/apps/files_encryption/tests/trashbin.php +++ b/apps/files_encryption/tests/trashbin.php @@ -20,15 +20,15 @@ * */ -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); -require_once realpath(dirname(__FILE__) . '/../../files_trashbin/appinfo/app.php'); -require_once realpath(dirname(__FILE__) . '/util.php'); +require_once dirname(__FILE__) . '/../../../lib/base.php'; +require_once dirname(__FILE__) . '/../lib/crypt.php'; +require_once dirname(__FILE__) . '/../lib/keymanager.php'; +require_once dirname(__FILE__) . '/../lib/proxy.php'; +require_once dirname(__FILE__) . '/../lib/stream.php'; +require_once dirname(__FILE__) . '/../lib/util.php'; +require_once dirname(__FILE__) . '/../appinfo/app.php'; +require_once dirname(__FILE__) . '/../../files_trashbin/appinfo/app.php'; +require_once dirname(__FILE__) . '/util.php'; use OCA\Encryption; diff --git a/apps/files_encryption/tests/util.php b/apps/files_encryption/tests/util.php index 368b7b3dc3f..7f80de59338 100755 --- a/apps/files_encryption/tests/util.php +++ b/apps/files_encryption/tests/util.php @@ -6,13 +6,13 @@ * See the COPYING-README file. */ -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); +require_once dirname(__FILE__) . '/../../../lib/base.php'; +require_once dirname(__FILE__) . '/../lib/crypt.php'; +require_once dirname(__FILE__) . '/../lib/keymanager.php'; +require_once dirname(__FILE__) . '/../lib/proxy.php'; +require_once dirname(__FILE__) . '/../lib/stream.php'; +require_once dirname(__FILE__) . '/../lib/util.php'; +require_once dirname(__FILE__) . '/../appinfo/app.php'; use OCA\Encryption; diff --git a/apps/files_encryption/tests/webdav.php b/apps/files_encryption/tests/webdav.php index 1d406789f0c..b72f6816951 100755 --- a/apps/files_encryption/tests/webdav.php +++ b/apps/files_encryption/tests/webdav.php @@ -20,14 +20,14 @@ * */ -require_once realpath(dirname(__FILE__) . '/../../../lib/base.php'); -require_once realpath(dirname(__FILE__) . '/../lib/crypt.php'); -require_once realpath(dirname(__FILE__) . '/../lib/keymanager.php'); -require_once realpath(dirname(__FILE__) . '/../lib/proxy.php'); -require_once realpath(dirname(__FILE__) . '/../lib/stream.php'); -require_once realpath(dirname(__FILE__) . '/../lib/util.php'); -require_once realpath(dirname(__FILE__) . '/../appinfo/app.php'); -require_once realpath(dirname(__FILE__) . '/util.php'); +require_once dirname(__FILE__) . '/../../../lib/base.php'; +require_once dirname(__FILE__) . '/../lib/crypt.php'; +require_once dirname(__FILE__) . '/../lib/keymanager.php'; +require_once dirname(__FILE__) . '/../lib/proxy.php'; +require_once dirname(__FILE__) . '/../lib/stream.php'; +require_once dirname(__FILE__) . '/../lib/util.php'; +require_once dirname(__FILE__) . '/../appinfo/app.php'; +require_once dirname(__FILE__) . '/util.php'; use OCA\Encryption; |