fix(coderd): reject workspace proxy hostname prefixes (#27544) (#27616) · coder/coder@d547bea · GitHub
Skip to content

Commit d547bea

Browse files
github-actions[bot]geokatBobbyHo
authored
fix(coderd): reject workspace proxy hostname prefixes (#27544) (#27616)
Backport of #27544 Original PR: #27544 — fix(coderd): reject workspace proxy hostname prefixes Merge commit: 8cc7f2b Requested by: @geokat Co-authored-by: George K <george@coder.com> Co-authored-by: Bobby Ho <bobbidinho@gmail.com>
1 parent b7d2742 commit d547bea

4 files changed

Lines changed: 63 additions & 2 deletions

File tree

coderd/database/querier_test.go

Lines changed: 52 additions & 0 deletions

coderd/database/queries.sql.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

coderd/database/queries/proxies.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ WHERE
120120
(
121121
(
122122
@allow_access_url :: bool = true AND
123-
url SIMILAR TO '[^:]*://' || @hostname :: text || '([:/]?%)*'
123+
url SIMILAR TO '[^:]*://' || @hostname :: text || '([:/]%)*'
124124
) OR
125125
(
126126
@allow_wildcard_hostname :: bool = true AND

coderd/workspaceapps_test.go

Lines changed: 9 additions & 0 deletions

0 commit comments

Comments
 (0)