Skip to content

Commit 7aa01b7

Browse files
authored
Merge pull request #4 from lassejlv/development
Update allowDangerousSqlCommands message
2 parents b2f2141 + 3549a32 commit 7aa01b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ app.post('/query', zValidator('json', schema), async (c) => {
3131
const allowDangerousSqlCommands = process.env.ALLOW_DANGEROUS_SQL_COMMANDS === 'true'
3232

3333
if (!allowDangerousSqlCommands && (query.includes('DROP') || query.includes('DELETE') || query.includes('TRUNCATE'))) {
34-
return c.json({ error: 'Dangerous SQL command' }, 400)
34+
return c.json({ error: 'dangerous sql commands is disabled' }, 400)
3535
}
3636

3737
const result = await pool.query(query, args);

0 commit comments

Comments
 (0)