Skip to content

impl: verify cli signature #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 25, 2025
Merged
Prev Previous commit
Next Next commit
fix: transform to url only after we checked the validation result
  • Loading branch information
fioan89 committed Jul 25, 2025
commit 8623572270fe1f9dc7a6c9573cf7bda3b066aac2
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

- support for checking if CLI is signed
- improved progress reporting while downloading the CLI
- URL validation is stricter in the connection screen
- URL validation is stricter in the connection screen and URI protocol handler

## 2.21.1 - 2025-06-26

Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/com/coder/gateway/util/URLExtensions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ fun URL.withPath(path: String): URL = URL(
if (path.startsWith("/")) path else "/$path",
)


fun String.validateStrictWebUrl(): WebUrlValidationResult = try {
val uri = URI(this)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ class CoderWorkspacesStepView :
component.apply() // Force bindings to be filled.
if (settings.requireTokenAuth) {
val result = fields.coderURL.validateStrictWebUrl()
val newURL = fields.coderURL.toURL()
if (result is WebUrlValidationResult.Invalid) {
tfUrlComment.apply {
this?.foreground = UIUtil.getErrorForeground()
Expand All @@ -576,6 +575,7 @@ class CoderWorkspacesStepView :
}
return
}
val newURL = fields.coderURL.toURL()
val pastedToken =
dialogUi.askToken(
newURL,
Expand Down
Loading