mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 21:00:58 +03:00
Secure password reset endpoints (#5167)
fix: prevent sensitive data exposure in password reset
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { User } from '../enterprise/database/entities/user.entity'
|
||||
|
||||
export function sanitizeNullBytes(obj: any): any {
|
||||
const stack = [obj]
|
||||
|
||||
@@ -30,3 +32,11 @@ export function sanitizeNullBytes(obj: any): any {
|
||||
|
||||
return obj
|
||||
}
|
||||
|
||||
export function sanitizeUser(user: Partial<User>) {
|
||||
delete user.credential
|
||||
delete user.tempToken
|
||||
delete user.tokenExpiry
|
||||
|
||||
return user
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user