fix(html): reject unknown slots in block IDs
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-03 17:25:49 +00:00
parent c84bd21cf4
commit 25dc761d0b
2 changed files with 5 additions and 0 deletions

View file

@ -18,6 +18,9 @@ func ParseBlockID(id string) []byte {
if len(part) != 1 {
return nil
}
if _, ok := slotRegistry[part[0]]; !ok {
return nil
}
slots = append(slots, part[0])
} else if part != "0" {
return nil

View file

@ -155,6 +155,8 @@ func TestParseBlockID(t *testing.T) {
{"L-1-C-0", nil},
{"L-0-C", nil},
{"LL-0", nil},
{"X-0", nil},
{"H-0-X-0", nil},
}
for _, tt := range tests {