Opened 12 years ago
Closed 10 years ago
#24 closed defect (fixed)
cl-openid::parse-kv incorrectly splits message into key-value pairs by char code for #\Newline, instead of #\Newline character itself
Reported by: | Avodonosov | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | code | Version: | 1.0 portable |
Keywords: | test-failure | Cc: |
Description (last modified by )
message elements (pairs) are separated from each other with #\Newline character.
cl-openid::parse-kv accepts the message as a byte array, and splits it into pairs by searching for byte 10 - char code for #\Newline.
This is incorrect, because 10 may also be a part of some multi-byte character.
We need to first decode byte array into string, and then split by #\Newlines.
The problem was detected because test cl-openid.parse-kv/random fails sometimes:
Sometimes this test case fails. For example see this log: https://cl-test-grid.appspot.com/blob?key=176038
But sometimes it passes; example: https://cl-test-grid.appspot.com/blob?key=171015
Change History (2)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|---|
Summary: | the test cl-openid.parse-kv/random fails sometimes → cl-openid::parse-kv incorrectly splits message into key-value pairs by char code for #\Newline, instead of #\Newline character itself |
comment:2 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed: https://github.com/cl-openid/cl-openid/commit/493152a333d3248db2996b7cbe3eb79cd844f357