Skip to content

Continue enhancing SQL protections#7707

Open
labkey-jeckels wants to merge 9 commits into
developfrom
fb_sqlProtections
Open

Continue enhancing SQL protections#7707
labkey-jeckels wants to merge 9 commits into
developfrom
fb_sqlProtections

Conversation

@labkey-jeckels
Copy link
Copy Markdown
Contributor

@labkey-jeckels labkey-jeckels commented May 30, 2026

Rationale

Robust SQL generation is important. Code cleanup and consolidation is nice too.

Changes

  • Make previous checks mandatory instead of being gated behind experimental flag (defaulting to being enforced)
  • Introduce new set of checks behind a deprecated flag
    • Potentially malformed strings or numbers
    • Pivot values
  • Handle special characters in stored procedure names
  • Use SQLFragment instead of String for stored procedure calls
  • Misc lint cleanup

Tasks 📍

  • Claude Code Review
  • Manual Testing
  • Test Automation


@Override
public String buildProcedureCall(String procSchema, String procName, int paramCount, boolean hasReturn, boolean assignResult, DbScope procScope)
protected String doBuildProcedureCall(String qualifiedProcName, int paramCount, boolean hasReturn, boolean assignResult, DbScope procScope)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be (String schema, String proc) OR (SQLFragment qualifiedProcName)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to SQLFragment

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants