-
Notifications
You must be signed in to change notification settings - Fork 63
Closed
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.
Milestone
Description
Bug description
This is a bug in Prisma Studio . When " in present as a value in String field , Prisma studio fails to handle it and " acts in a similar manner to how it acts in a SQL Injection and the query fails. This issue as per my knowledge only exists in Prisma Studio.
How to reproduce
- Create any kind of model in Prisma
schemafile withStringfield. - Open the model in Prisma Studio and try to add or update the field of type
Stringwith an"in it. - It Shows an error as shown in
Prisma informationsection of this bug report.
Expected behavior
No response
Prisma information
Schema
model User {
id Int @id @default(autoincrement())
name String
picture String?
email String @unique
password String?
email_verified Boolean @default(false)
}
Error
Type: undefined
Message: Invalid or unexpected token
Code: undefined
Query:
prisma.user.update(
{
where: {
id: 1,
},
data: {
name: "Jhon Doe"",
},
select: {
id: true,
name: true,
},
}
)
Environment & setup
- OS: Windows
- Database: PostgreSQL
- Node.js version: v14.16.0
Prisma Version
2.25.0
Metadata
Metadata
Assignees
Labels
bug/2-confirmedBug has been reproduced and confirmed.Bug has been reproduced and confirmed.kind/bugA reported bug.A reported bug.