summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-07-21 22:55:26 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-07-21 22:55:26 +0200
commit98c269be53c1660899bdd357fcdfd87f096a7cdd (patch)
treeba684629ce8fcdb037480117fa6807a5d767387a /apps/files_external
parent1ae68047eaa0662d4e57501bf84a57d5b28c3894 (diff)
downloadnextcloud-server-98c269be53c1660899bdd357fcdfd87f096a7cdd.tar.gz
nextcloud-server-98c269be53c1660899bdd357fcdfd87f096a7cdd.zip
Fix invalid recursion
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/config.php4
-rw-r--r--apps/files_external/tests/Config/PlaceholderSubstituteTest.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 2f0cbaca790..5935d117e91 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -287,9 +287,7 @@ class OC_Mount_Config {
$result = true;
if(is_array($option)) {
foreach ($option as $optionItem) {
- if(is_array($optionItem)) {
- $result = $result && self::arePlaceholdersSubstituted($option);
- }
+ $result = $result && self::arePlaceholdersSubstituted($optionItem);
}
} else if (is_string($option)) {
if (strpos(rtrim($option, '$'), '$') !== false) {
diff --git a/apps/files_external/tests/Config/PlaceholderSubstituteTest.php b/apps/files_external/tests/Config/PlaceholderSubstituteTest.php
index 95ef8abda9b..c143d969121 100644
--- a/apps/files_external/tests/Config/PlaceholderSubstituteTest.php
+++ b/apps/files_external/tests/Config/PlaceholderSubstituteTest.php
@@ -32,6 +32,8 @@ class PlaceholderSubstituteTest extends TestCase {
return [
['smb_$user', false],
['hidden_share$', true],
+ [['smb_$user', 'hidden_share$'], false],
+ [['smb_hello', 'hidden_share$'], true]
];
}