FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(postgres): custom-SQL allowlist must not use substring matching · Issue #791 · QueryaHub/Querya-Desktop · GitHub

fix(postgres): custom-SQL allowlist must not use substring matching #791

Description

Summary

isAllowedPostgresSelectQuery blocks any script containing insert , update , delete , drop , … — false positives on inserted_at, dropped_at. It allows anything starting with select / with / ( including a second statement if the driver ever uses simple protocol. Leading ( is enough to pass.

Scope

  • Classify by the first statement after comments (reuse stripLeadingWhitespaceAndLineComments), not contains.
  • Allow SELECT / WITH / TABLE / VALUES / (SELECT …) only; reject multi-statement.
  • Tests: SELECT inserted_at FROM t allowed; SELECT 1; DELETE FROM t rejected.

Out of scope

  • Full SQL editor (already has DestructiveSqlDetector). This is the Table Browser SQL dialog only.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingerror-handlingTheme parser epic label: error-handlingfrontendTheme parser epic label: frontend

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL