You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(config): escape LIKE wildcards in registration search filter (parity with ListCloudAccounts) #719
filter.Search is bound as $N so this is not SQL injection — the value never enters SQL text. BUT % / _ / \ in filter.Search are not escaped. A user passing %@gmail.com matches every email containing @gmail.com rather than literally containing %@gmail.com. Enumeration / minor information-disclosure risk.
Fix
Mirror the working pattern in internal/config/store_postgres.go:1974 (ListCloudAccounts search filter): escape %, _, \ before wrapping with %...% and add ESCAPE '\\' to the ILIKE.
Add a regression test asserting that filter.Search = "%foo" matches the literal %foo substring, not any foo-containing string.
Verified shipped: PR #720 (commit 5c15dd3, merged 2026-05-27) is in feat/multicloud-web-frontend. store_postgres_registrations.go now escapes %, _, \ in Search filter before ILIKE wrap, matching the pattern in ListCloudAccounts. Regression test added in store_postgres_pgxmock_test.go.
Activity
fix(config): escape LIKE wildcards in registration search filter (#720)
cristim commentedon May 28, 2026
Verified shipped: PR #720 (commit 5c15dd3, merged 2026-05-27) is in feat/multicloud-web-frontend. store_postgres_registrations.go now escapes %, _, \ in Search filter before ILIKE wrap, matching the pattern in ListCloudAccounts. Regression test added in store_postgres_pgxmock_test.go.