cloudfoundry / gorouter

CF Router
Apache License 2.0
441 stars 226 forks source link

Check trace ID length before parsing the UUID #365

Closed mariash closed 1 year ago

mariash commented 1 year ago

Reported here https://github.com/cloudfoundry/routing-release/issues/346

Parser for b3 trace ID header assumes the length is at least 20 characters, but b3 accepts length of 16 characters as well. Instead of throwing an error, accept b3 trace id as it was provided and it only gets validated by b3.ParseSingleHeader.