Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
Fix password change issue.
Mike Caobde1949e8fea
diff --git a/package.json b/package.jsonindex e6dc21ec2..18207e6c0 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "umami",- "version": "0.33.0",+ "version": "0.34.0","description": "A simple, fast, website analytics alternative to Google Analytics. ","author": "Mike Cao <[email protected]>","license": "MIT",diff --git a/pages/api/account/password.js b/pages/api/account/password.jsindex c9c955fa4..1b364d7b1 100644--- a/pages/api/account/password.js+++ b/pages/api/account/password.js@@ -6,10 +6,10 @@ import { checkPassword, hashPassword } from 'lib/crypto';export default async (req, res) => {await useAuth(req, res);- const { user_id, is_admin } = req.auth;- const { current_password, new_password } = req.body;+ const { user_id: auth_user_id, is_admin } = req.auth;+ const { user_id, current_password, new_password } = req.body;- if (is_admin) {+ if (!is_admin || user_id !== auth_user_id) {return unauthorized(res);}