Closed bilde2910 closed 3 years ago
Thanks for the detailled report, we'll look into it as soon as time permits.
@bilde2910, I'm able to reliably reproduce the bug here at my end, and I think I also know what might be happening. Working on the fix right now.
Some QR codes don't appear to scan properly. See e.g. the code below, which will consistently fail for me:
The URI encoded is this:
sqrl://apps.varden.info/wfptools/history/sqrlauth.php?x=17&sfn=V2F5ZmFyZXIgSGlzdG9yeQ&nut=Uwx16PPuRdxkSwFxQYCBADCjnNAMRl3EKJH6XQkhIaY
When the app scans the code to authenticate, this is what it somehow ends up with:
sqrl://apps.varden.info/wfptools/history/sqrlauth.php?x=17&sfn=V2F5ZmFyZXIgSGlzdG9yeQ&nut=Uwx16PPuRdxkSwFxjnNAMRl3khIaY
Note the difference in the nut:
The "spaced" one is the scanned one, but adding in spaces so that it aligns to the original one. You can tell that it has mysteriously dropped some characters from the base64url-encoded nut.
I have tried switching around the
nut
andsfn
and if thesfn
is at the end, then thesfn
appears to be corrupted in this way. It does not happen to all codes, but it happens to the majority of the codes I generate this way.Should be noted that when one QR code fails to scan, it appears to fail consistently (dropping the same bits) every time that code is scanned, no matter how close/far away I am or what angle I attempt to scan it from. This would suggest that detects the code correctly, but parses it wrongly.
QRcode::png($url, null, QR_ECLEVEL_M, 6);
).Not sure what other kind of information you need, so just ask if you want more info, or more samples