79653427

Date: 2025-06-04 20:08:39
Score: 0.5
Natty:
Report link

Is there any way I can determine if the query is truly safe? My current IsQuerySafe(string) method

That rather sounds like The Halting Problem...., but

Essentially, I want to only allow select queries

Use a different database login (ie. connection string) that has only read access. Any attempt to perform a modification will be an access violation. (On SQL Serve a user with just db_datareader role would do it on the relevant database, and no access at all to others.)

Reasons:
  • Blacklisted phrase (1): Is there any
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Starts with a question (0.5): Is there any
  • High reputation (-2):
Posted by: Richard