Skip to content

Commit

Permalink
3.0.10
Browse files Browse the repository at this point in the history
Fix for #3903
  • Loading branch information
nilsteampassnet committed Oct 23, 2023
1 parent 9d24f32 commit ec21d0b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion includes/config/include.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
define('TP_VERSION', '3.0.10');
define("UPGRADE_MIN_DATE", "1697990713");
define('TP_VERSION_MINOR', '85');
define('TP_VERSION_MINOR', '86');
define('TP_TOOL_NAME', 'Teampass');
define('TP_ONE_DAY_SECONDS', 86400);
define('TP_ONE_WEEK_SECONDS', 604800);
Expand Down
14 changes: 11 additions & 3 deletions sources/main.functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1649,7 +1649,7 @@ function makeThumbnail(string $src, string $dest, int $desired_width)
function prefixTable(string $table): string
{
$safeTable = htmlspecialchars(DB_PREFIX . $table);
if (! empty($safeTable)) {
if (empty($safeTable) === false) {
// sanitize string
return $safeTable;
}
Expand Down Expand Up @@ -2465,7 +2465,11 @@ function recursiveChmod(
// See whether this is a file
if (is_file($path)) {
// Chmod the file with our given filepermissions
chmod($path, $filePerm);
try {
chmod($path, $filePerm);
} catch (Exception $e) {
return false;
}
// If this is a directory...
} elseif (is_dir($path)) {
// Then get an array of the contents
Expand All @@ -2479,7 +2483,11 @@ function recursiveChmod(
}

// When we are done with the contents of the directory, we chmod the directory itself
chmod($path, $dirPerm);
try {
chmod($path, $filePerm);
} catch (Exception $e) {
return false;
}
}

// Everything seemed to work out well, return true
Expand Down

0 comments on commit ec21d0b

Please sign in to comment.