Commit 00578a96a1

00578a96a15f28b39508682c570aec5f669aeeb0

parent: de8a2ff1a9

Verified · cmc ci/build: success ci/test: success

cmc <hello@cleberg.net> · 2026-09-09 04:16 UTC

e2e: the settings page shows the fingerprint HTML-escaped

Ref #184
e2e/runnerweb_test.go +4 −1
@@ -35,8 +35,11 @@ func TestRunnerSettingsWeb(t *testing.T) {
3535 }
3636 fp := out[strings.Index(out, "SHA256:"):]
3737 fp = fp[:strings.Index(fp, `"`)]
38 // html/template writes + as &#43; in text and attributes, and a
39 // fingerprint is base64, so the page shows the escaped form.
40 shown := strings.ReplaceAll(fp, "+", "&#43;")
3841 _, body = browserGet(t, alice, settings)
39 if !strings.Contains(body, fp) || !strings.Contains(body, `value="runner-remove"`) {
42 if !strings.Contains(body, shown) || !strings.Contains(body, `value="runner-remove"`) {
4043 t.Fatalf("attached runner not listed:\n%s", body)
4144 }
4245 if status, _ := browserPost(t, alice, settings, url.Values{"field": {"runner-remove"}, "fingerprint": {fp}}); status != 200 {