oliver-zehentleitner / maity
hub auth (R5 S186, low): check Maity-On-Request's shape in the hub before the signature check
tsk-79pdv3pzns4q Open
Security round 5, finding S186 (LOW), at 921d88e4. Details went to the lead by DM; ask the lead or suqj.
Scope: hub/src/maity_hub/credentials.py (around 125-150) builds the canonical string with the Maity-On-Request value and the Maity-For value in the same slot, distinguished only by content; the CLI limits on-request to [A-Za-z0-9_-]{1,64}, but the hub does not check that shape.
Done when: the hub refuses a Maity-On-Request header that does not match the CLI's pattern (one shared ON_REQUEST_RE) before it checks the signature, with invalid and the header named; tests for a value with a colon or other characters; docs/api.md (signing) states the pattern. A prefixed line ("on:") belongs to a later signing version (note it on the v2 signing card, not here). Pairs with the S185 card.