ax(ueps): fix inaccurate usage example in ReadAndVerify default case
The comment omitted tagValueLength from the signedData write sequence, making it an incorrect usage example (AX Principle 2). Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
2a43c0a39f
commit
80b8b20507
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(tagByte); signedData.Write(tagValue) — unknown tags contribute to HMAC, blocking injection
|
||||
// signedData.WriteByte(tagByte); signedData.WriteByte(tagValueLength); signedData.Write(tagValue) — unknown tags contribute to HMAC, blocking injection
|
||||
signedData.WriteByte(tagByte)
|
||||
signedData.WriteByte(tagValueLength)
|
||||
signedData.Write(tagValue)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue