CZ-NIC / django-fido

Django application for FIDO protocol U2F
GNU General Public License v3.0
28 stars 11 forks source link

Fix FIDO registration in django admin in Google Chrome #63

Closed stinovlas closed 4 years ago

stinovlas commented 4 years ago

FIDO registration is throwing NotAllowedError using admin's AuthenticatorAddView in Google Chrome. Chrome asks for the PIN first and then, after correct PIN has been entered, it throws the error.

Registration is working fine in Firefox and the Authentication works fine in both Chrome and Firefox (Chrome is asking for the PIN, Firefox [still having only U2F support] is not).

It seems that this issue appears only when user.displayName is empty. I don't know why Chrome doesn't allow this, but we can fix the issue by using the username as a backup value in case that user.get_full_name() returns empty string.