-
-
Notifications
You must be signed in to change notification settings - Fork 75
Closed
Labels
wontfixThis will not be worked onThis will not be worked on
Description
Version(s) affected
4.7
Description
Hi
I got error could not load data when a called method
$publicKeyCredentialLoader->load($data);
I found that this method
createFormJson in Webauthn\CollectedClientData call this code on line 91
$rawData = Base64UrlSafe::decodeNoPadding($data);
but when i changed to
$rawData = base64_decode($data);
everythings work ok.
How to reproduce
just send this base 64 encoded string to method createFormJson and it will throw error
eyJ0eXBlIjoid2ViYXV0aG4uY3JlYXRlIiwiY2hhbGxlbmdlIjoiWVdFIiwib3JpZ2luIjoiaHR0cDovL2xvY2FsaG9zdDozMDAwIiwiY3Jvc3NPcmlnaW4iOmZhbHNlfQ==
despite the fact, that this string is valid base64 encoded string
Possible Solution
change
$rawData = Base64UrlSafe::decodeNoPadding($data);
to
$rawData = base64_decode($data);
Additional Context
No response
Metadata
Metadata
Assignees
Labels
wontfixThis will not be worked onThis will not be worked on