Closed NathanReb closed 6 years ago
Just fixed the tests!
Hmm this is a breaking change, I'll update CHANGES.md!
I usually do that just before releasing, but that works as well.
Is there an easy way to stay compatible with the former format, for just a single release?
I guess we could try to parse it as hex encoded and if it fails, fallback to a raw string? Does it sound good to you?
Yes, that would work. Also, I'm not sure that parsing as a raw string used to work, since IIRC "%S"
is used when dumping but the raw string is returned in the other direction (that would mean that escape characters are left).
Anyway, the fix is the important part, so if compatibility is a problem, we can just declare a breaking change here.
The problem with that solution is that if you had serialized CKA_ID "0x00"
before the fix, you'll get CKA_ID "\x00"
when deserializing it with the fixed version.
I'm not sure this is likely to happen but in that case, it would be a breaking change and you wouldn't know about it :/
I have a patch for pseudo compatibility if you want it so let me know what you prefer!
OK, let's keep it simple then!
Thanks!
CKA_ID is associated with an arbitrary byte string, potentially containing non ascii characters leading to invalid json encoding.