diff options
-rw-r--r-- | core/css/inputs.scss | 16 | ||||
-rw-r--r-- | lib/private/Files/Storage/Local.php | 12 |
2 files changed, 12 insertions, 16 deletions
diff --git a/core/css/inputs.scss b/core/css/inputs.scss index 64a46e14ba1..3ae0c3a270e 100644 --- a/core/css/inputs.scss +++ b/core/css/inputs.scss @@ -24,7 +24,7 @@ $default-height: 34px; /* Simple selector to allow easy overriding */ select, -button:not(.vue), +button, input, textarea, div[contenteditable=true], @@ -43,7 +43,7 @@ div[contenteditable=false] { /* Default global values */ div.select2-drop .select2-search input, // TODO: REMOVE WHEN DROPPING SELECT2 select, -button:not(.vue), .button:not(.vue), +button, .button, input:not([type='range']), textarea, div[contenteditable=true], @@ -168,8 +168,8 @@ input { /* 'Click' inputs */ select, -button:not(.vue), .button:not(.vue), -input[type='button']:not(.vue), +button, .button, +input[type='button'], input[type='submit'], input[type='reset'] { padding: 6px 16px; @@ -184,7 +184,7 @@ input[type='reset'] { } } select, -button:not(.vue), .button:not(.vue) { +button, .button { * { cursor: pointer; } @@ -197,8 +197,8 @@ button:not(.vue), .button:not(.vue) { } /* Buttons */ -button:not(.vue), .button:not(.vue), -input[type='button']:not(.vue), +button, .button, +input[type='button'], input[type='submit'], input[type='reset'] { font-weight: bold; @@ -215,7 +215,7 @@ input[type='reset'] { color: #fff !important; } } -button:not(.vue), .button:not(.vue) { +button, .button { > span { /* icon position inside buttons */ &[class^='icon-'], diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 944b0b69959..c21364847e1 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -288,16 +288,14 @@ class Local extends \OC\Files\Storage\Common { } } - private function treeContainsBlacklistedFile(string $path): bool { + private function checkTreeForForbiddenItems(string $path) { $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path)); foreach ($iterator as $file) { /** @var \SplFileInfo $file */ if (Filesystem::isFileBlacklisted($file->getBasename())) { - return true; + throw new ForbiddenException('Invalid path: ' . $file->getPathname(), false); } } - - return false; } public function rename($path1, $path2) { @@ -337,9 +335,7 @@ class Local extends \OC\Files\Storage\Common { return $result; } - if ($this->treeContainsBlacklistedFile($this->getSourcePath($path1))) { - throw new ForbiddenException('Invalid path', false); - } + $this->checkTreeForForbiddenItems($this->getSourcePath($path1)); } return rename($this->getSourcePath($path1), $this->getSourcePath($path2)); @@ -437,7 +433,7 @@ class Local extends \OC\Files\Storage\Common { */ public function getSourcePath($path) { if (Filesystem::isFileBlacklisted($path)) { - throw new ForbiddenException('Invalid path', false); + throw new ForbiddenException('Invalid path: ' . $path, false); } $fullPath = $this->datadir . $path; |