ax(ueps): replace code-restatement comment with semantic explanation
The default switch-case comment in ReadAndVerify restated the three lines immediately following it verbatim, violating AX Principle 2 (comments as usage examples, not code descriptions). Replaced with a single line explaining the security intent of the behaviour. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
2a5a3d6393
commit
b64ce31f69
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
|
|||
case TagHMAC:
|
||||
hmacSignature = tagValue
|
||||
default:
|
||||
// signedData.WriteByte(tagType); signedData.WriteByte(tagValueLength); signedData.Write(tagValue) — unknown tags contribute to HMAC, blocking injection
|
||||
// unknown tags contribute to HMAC coverage, blocking tag-injection attacks
|
||||
signedData.WriteByte(tagType)
|
||||
signedData.WriteByte(tagValueLength)
|
||||
signedData.Write(tagValue)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue