mirror of
https://github.com/diced/zipline.git
synced 2025-12-12 15:50:11 -08:00
fix: password being set when empty
This commit is contained in:
@@ -49,7 +49,7 @@ export default fastifyPlugin(
|
||||
|
||||
let password: string | null | undefined = undefined;
|
||||
if (req.body.password !== undefined) {
|
||||
if (req.body.password === null) {
|
||||
if (req.body.password === null || req.body.password === '') {
|
||||
password = null;
|
||||
} else if (typeof req.body.password === 'string') {
|
||||
password = await hashPassword(req.body.password);
|
||||
|
||||
Reference in New Issue
Block a user