Skip to content

Conversation

@grzuy
Copy link
Contributor

@grzuy grzuy commented Oct 2, 2018

Follow up should be add some test coverage for this after https://github.com/cedarcode/webauthn-ruby/pull/70/files#diff-eda0ea1702d5d6e57c7f8eed6aa93151R24 is merged.

@grzuy grzuy changed the title fix: consider user present in UV (User Verified) flag present fix: consider user present if UV (User Verified) flag present Oct 3, 2018

def user_present?
flags[USER_PRESENT_FLAG_POSITION] == "1"
flags[USER_PRESENT_FLAG_POSITION] == "1" || user_verified?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loses the ability to verify only a UP flag. Changing valid? method to check both might be better?

Copy link
Contributor Author

@grzuy grzuy Oct 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true.

The thing is I wanted to keep this logic contained within AuthenticatorData. I think we can have both things by reworking a bit this methods in AuthenticatorData...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your feedback! :-)

@grzuy grzuy changed the title fix: consider user present if UV (User Verified) flag present fix: make response valid if either UP or UV flags are present Oct 4, 2018
@grzuy grzuy merged commit 7996f8c into master Oct 8, 2018
@grzuy grzuy deleted the fix_validation_of_user_presence branch October 8, 2018 00:30
@grzuy grzuy added this to the 1.2 milestone Oct 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants