You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@oltu.apache.org by "Antonio Sanso (JIRA)" <ji...@apache.org> on 2017/10/25 13:10:00 UTC
[jira] [Updated] (OLTU-184) Failed to parse generated Base64 JWT
back
[ https://issues.apache.org/jira/browse/OLTU-184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Sanso updated OLTU-184:
-------------------------------
Labels: review (was: )
> Failed to parse generated Base64 JWT back
> -----------------------------------------
>
> Key: OLTU-184
> URL: https://issues.apache.org/jira/browse/OLTU-184
> Project: Apache Oltu
> Issue Type: Bug
> Reporter: Khoa Nguyen
> Labels: review
>
> The TokenReader can't parse a JWT with a dash ('-') due to the validation pattern failed to match.
> The TokenDecoder uses a URL Base64 encoder/decoder which replaces "+" and "/" into "-" & "_". However, in the TokenReader, the validation pattern is:
> ```
> private final Pattern base64urlTokenPattern = Pattern.compile("([a-zA-Z0-9/+=]+)\\.([a-zA-Z0-9/+=]+)\\.(.+)");
> ```
> ... which doesn't allow "-" or "_" and causes the IllegalArgumentException.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)