Skip to content

Commit d2dc948

Browse files
committed
Fix possible path existence disclossure
On non released versions (where line counts are not precalculated) it was possible to check for file existence due to limited checks for supplied path. Signed-off-by: Michal Čihař <michal@cihar.com>
1 parent 94ec333 commit d2dc948

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/error_report.lib.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ function PMA_countLines($filename)
238238
foreach (explode('/', $filename) as $part) {
239239
if ($part == '..') {
240240
$depath--;
241-
} elseif ($part != '.') {
241+
} elseif ($part != '.' || $part === '') {
242242
$depath++;
243243
}
244244
if ($depath < 0) {

0 commit comments

Comments
 (0)