atholbro/paseto

Discrepancy between Java vs PHP footer implementations

Closed this issue · 1 comments

Hello!

We're using both the PHP and Java Paseto implementations, and there's a discrepancy between the footer handling.

The Java implementation adds quotes to a String footer; the PHP implementation assumes the value is already a String. For example, if you set the footer to the String "TEST" in Java, and retrieve the footer in PHP... the value will be ""TEST"". Setting and retrieving in PHP preserves it exactly as a String value. The source of this is JacksonJsonProvider, where objectMapper.writeValueAsString serializes a String including quotes.

This might seem like a minor discrepancy, but it really affects the "platform agnostic" part if one needs to do different footer checks/comparisons based on the platform :)

Hey,

Just fixed this and pushed the changes. It will be fixed in the next release.