You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The yaml file reader does not remove quotes from strings. This results in invalid evidence being provided when used in tests and examples impacting the results.
The reader can also miss identify the end of a document and return fewer evidence pairs than expected. This also impacts the results of examples and tests that use the feature.
The text was updated successfully, but these errors were encountered:
51Degrees uses the YAMLDotNet YAML serializer when generating a test evidence file. Below are some transformations the serializer makes during serialization:
‘hello world → “’hello world” (wraps in double quotes)
hello’ world → hello’ world (leaves as plain)
hello world’ → hello world’ (leaves as plain)
‘hello world → “ ‘hello world” (wraps in double quotes)
“hello world” → ‘”hello world”’ (wraps in single quotes)
Notice the double quotes are used to wrap the string only when the single quote is the first non-whitespace character in the string.
51Degrees receives, in comparatively low volume, unique HTTP Headers that present in this format. The merge above deals with wrapping single quotes but, after further testing, the YAML Parser did not deal with the scenario where the string is wrapped in double quotes. This is due to the nature of Client Hint headers' format being wrapped in double quotes and those double quotes should not be stripped out.
Objective
When the YAML parser is processing evidence headers, it should account for the scenario where a useragent's first non -whitespace character is a single quote and has then been wrapped in double quotes by a YAML serializer.
f.e “’hello world”
Tests
Test that a useragent wrapped in double quotes has those double quotes properly stripped out.
Test that client hint evidence is left untouched and treated as plain(double quotes not stripped).
Test that single quote positions other than as the first non-whitespace character are not affected.
The yaml file reader does not remove quotes from strings. This results in invalid evidence being provided when used in tests and examples impacting the results.
The reader can also miss identify the end of a document and return fewer evidence pairs than expected. This also impacts the results of examples and tests that use the feature.
The text was updated successfully, but these errors were encountered: