-
Notifications
You must be signed in to change notification settings - Fork 16
Commit 0164c60
impl: verify cli signature (#562)
* impl: support for downloading and verifying cli signatures
* fix: class cast exception
* impl: embed the pgp public key as a plugin resource
This is the key that validates if the gpg signature was tampered
* chore: fix UTs related to CLI downloading
For one thing some method signature changed, some methods are now suspending functions
that will have to run in a coroutine in the tests. The second big issue is that now
the download function requests user's input via a dialog
* fix: download the correct CLI signature for Windows
The signature for windows CLI follows the format: coder-windows-amd64.exe.asc
Currently it is coded to coder-windows-amd64.asc which means the plugin
always fail to find any signature for windows cli
* chore: next version is 2.22.0
* impl: strict URL validation for the connection screen
This commit rejects any URL that is opaque, not hierarchical, not using http or https
protocol, or it misses the hostname.
* impl: strict URL validation for the URI handling
This commit rejects any URL that is opaque, not hierarchical, not using http or https
protocol, or it misses the hostname.
* fix: transform to url only after we checked the validation result
* chore: update UT expected result1 parent 3c8828d commit 0164c60
File tree
23 files changed
+1140
-195
lines changed- src
- main
- kotlin/com/coder/gateway
- cli
- downloader
- ex
- gpg
- settings
- util
- views/steps
- resources
- META-INF/trusted-keys
- messages
- test/kotlin/com/coder/gateway
- cli
- settings
- util
23 files changed
+1140
-195
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
7 | 13 |
| |
8 | 14 |
| |
9 | 15 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 | + | ||
60 | + | ||
59 | 61 |
| |
60 | 62 |
| |
61 | 63 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 | - | ||
8 | + | ||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
66 | 66 |
| |
67 | 67 |
| |
68 | 68 |
| |
69 | - | ||
69 | + | ||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
71 | + | ||
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | ||
76 | + | ||
77 | + | ||
78 | + | ||
71 | 79 |
| |
72 | 80 |
| |
73 | 81 |
| |
|
0 commit comments