Skip to content

Commit

Permalink
v1.3.1: Logout does not expire token
Browse files Browse the repository at this point in the history
  • Loading branch information
Neztore committed Jan 31, 2021
1 parent 26f8ef0 commit 53c357e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "save-server",
"version": "1.3.0",
"version": "1.3.1",
"description": "A powerful ShareX image and URL server, with support for multiple users.",
"main": "index.js",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion server/api/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ users.patch("/:id/token", errorCatch(async function (req, res) {


users.post("/:id/logout", errorCatch(async function (req, res) {
await db.expireToken(req.target.username);
if (req.user.username === req.target.username) {
res.cookie("authorization", "", {
httpOnly: true,
Expand Down

0 comments on commit 53c357e

Please sign in to comment.