close Warning: Can't synchronize with repository "(default)" (/project/cl-openid/svn does not appear to be a Subversion repository.). Look in the Trac log for more information.

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 avodonosov)

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 avodonosov

Description: modified (diff)
Summary: the test cl-openid.parse-kv/random fails sometimescl-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 avodonosov

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.