Skip to content

fix: reject whitespace-only SQL in frontend validation (#593)#815

Merged
LZS911 merged 1 commit intomainfrom
dms-ui/feat-593
Apr 13, 2026
Merged

fix: reject whitespace-only SQL in frontend validation (#593)#815
LZS911 merged 1 commit intomainfrom
dms-ui/feat-593

Conversation

@actiontech-bot
Copy link
Copy Markdown
Member

Summary

  • Add frontend validation to reject whitespace-only SQL input in data export form
  • Add unit tests for the whitespace SQL validation rule

Related: https://github.com/actiontech/dms-ee/issues/777

EDGE-BUG-001: The whiteSpaceSqlValidator only checked for the
placeholder value but did not reject whitespace-only input (spaces,
tabs, etc). This allowed whitespace SQL to bypass frontend validation
and reach the backend.

Updated the validator to also reject values that are empty or contain
only whitespace characters using trim(). Added test case for the
whitespace-only scenario.
@github-actions
Copy link
Copy Markdown

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 80.62% 29038/36019
🟡 Branches 62.41% 10699/17142
🟢 Functions 83.98% 9807/11678
🟢 Lines 84.65% 27741/32773

Test suite run success

3646 tests passing in 814 suites.

Report generated by 🧪jest coverage report action from 43ded98

@LZS911 LZS911 merged commit 2ab4805 into main Apr 13, 2026
8 checks passed
@LZS911 LZS911 deleted the dms-ui/feat-593 branch April 13, 2026 09:41
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.

3 participants