Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

fix(tests): update tests for recovery code updates #6075

Merged
merged 1 commit into from
Apr 17, 2018
Merged

Conversation

vbudhram
Copy link
Contributor

@vbudhram vbudhram commented Apr 16, 2018

This PR updates the tests to be backwards compatible with mozilla/fxa-auth-db-mysql#333.

@vbudhram vbudhram added this to the FxA-143: MFA milestone Apr 16, 2018
@vbudhram vbudhram self-assigned this Apr 16, 2018
@ghost ghost added the waffle:active label Apr 16, 2018
@vbudhram vbudhram removed the WIP label Apr 16, 2018
@@ -46,7 +46,7 @@ define(function (require, exports, module) {
// TOTP codes are 6 digits
const TOTP_CODE = /^[0-9]{6}$/;
// Recovery codes are 10 alpha numeric or 8 hex strings
const RECOVERY_CODE = /^(([a-z0-9]{10})|([a-f0-9]{8}))$/;
const RECOVERY_CODE = /^([a-zA-Z0-9]{1,10})$/;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated this regex to be a little more flexible to changes that might come from mozilla/fxa-auth-db-mysql#333.

Copy link
Contributor

Choose a reason for hiding this comment

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

How likely are 1 .. 7 recovery code lengths? Could make the cardinality {8,10} if they're not going to happen?

@vbudhram
Copy link
Contributor Author

@mozilla/fxa-devs r?

Copy link
Contributor

@philbooth philbooth left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants