Skip to content

Commit

Permalink
Fixed a bug that can prevent user saving a password
Browse files Browse the repository at this point in the history
  • Loading branch information
zigazajc007 committed Jun 3, 2024
1 parent 41a34b1 commit 4fee5c9
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "passky-server",
"description": "Server for Passky (password manager)",
"version": "8.1.6",
"version": "8.1.7",
"main": "tailwind.config.js",
"scripts": {
"build": "npx tailwindcss -i ./tailwind.css -o ./server/src/website/css/tailwind.min.css --minify"
Expand All @@ -17,6 +17,6 @@
},
"homepage": "https://github.com/Rabbit-Company/Passky-Server#readme",
"devDependencies": {
"tailwindcss": "^3.4.1"
"tailwindcss": "^3.4.3"
}
}
6 changes: 3 additions & 3 deletions server/src/Database.php
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ public static function savePassword(string $username, string $token, string $web
$stmt->bindParam(':message', $message, PDO::PARAM_STR);

Settings::removeLocalData($username . '_passwords', true);
Settings::increaseLocalData($username . '_password_count', 1, true);
Settings::removeLocalData($username . '_password_count', true);

return ($stmt->execute()) ? Display::json(0) : Display::json(3);
}catch(PDOException $e) {
Expand Down Expand Up @@ -608,11 +608,11 @@ public static function importPasswords(string $username, string $token, string $
}

Settings::removeLocalData($username . '_passwords', true);
Settings::removeLocalData($username . '_password_count', true);

if($stmt->execute()){
$num_success = count($passwordArray);
$num_error = count($password_obj) - count($passwordArray);
Settings::increaseLocalData($username . '_password_count', $num_success, true);
}else{
$num_error = count($password_obj);
}
Expand Down Expand Up @@ -693,7 +693,7 @@ public static function deletePassword(string $username, string $token, int $pass
$stmt->bindParam(':password_id', $password_id, PDO::PARAM_INT);

Settings::removeLocalData($username . '_passwords', true);
Settings::decreaseLocalData($username . '_password_count', 1, true);
Settings::removeLocalData($username . '_password_count', true);

return ($stmt->execute()) ? Display::json(0) : Display::json(11);
}catch(PDOException $e) {
Expand Down
2 changes: 1 addition & 1 deletion server/src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Settings{
*/

public static function getVersion() : string{
return '8.1.6';
return '8.1.7';
}

public static function getLocation() : string{
Expand Down
Loading

0 comments on commit 4fee5c9

Please sign in to comment.