Fix insecure default id for invites (#1789)
* Fix insecure default id for invites * Use 16 bytes
This commit is contained in:
		
							parent
							
								
									077727dced
								
							
						
					
					
						commit
						47debbcb06
					
				@ -0,0 +1,2 @@
 | 
			
		||||
-- AlterTable
 | 
			
		||||
ALTER TABLE "Invite" ALTER COLUMN "id" SET DEFAULT encode(gen_random_bytes(16), 'hex'::text);
 | 
			
		||||
@ -467,7 +467,7 @@ model LnWith {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
model Invite {
 | 
			
		||||
  id          String   @id @default(cuid())
 | 
			
		||||
  id          String   @id @default(dbgenerated("encode(gen_random_bytes(16), 'hex'::text)"))
 | 
			
		||||
  createdAt   DateTime @default(now()) @map("created_at")
 | 
			
		||||
  updatedAt   DateTime @default(now()) @updatedAt @map("updated_at")
 | 
			
		||||
  userId      Int
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user