fix!: Don't log potentially sensitive value in Value::validate - #666
fix!: Don't log potentially sensitive value in Value::validate#666Kriskras99 wants to merge 4 commits into
Value::validate#666Conversation
|
IIRC this has been requested by someone to be able to debug validation issues. They said that it is hard to debug such issues when using big/huge schemas. The actual request was to print the path to the failing field but this was rather complex to implement. Maybe log it as a |
|
I was already thinking about adding the path to the error. So I'll try that! |
|
I still need to do schema, but here is a sample of improved error messages (top is new, bottom is old): You'll notice that when the actual value ( It costs a bit of extra stack space and two extra references being passed to |
|
Would be possible to print the |
|
Absolutely, I was thinking of |
|
Schema path is now also added. I think this would also be useful in the errors for the serializer and deserializer. Let me know what you think. |
This is done by removing the logging completely and returing an error instead of a boolean. The code will also no longer panic when it fails to resolve the schema. This is a breaking change, users can fix their code by adding `.is_ok()` to get the previous behaviour. Reported-by: CodeQL
48ce12b to
5db4927
Compare
This is done by removing the logging completely and returing an error instead of a boolean. The code will also no longer panic when it fails to resolve the schema.
This is a breaking change, users can fix their code by adding
.is_ok()to get the previous behaviour.Reported-by: CodeQL