Closed depontimatteo closed 2 years ago
Merging #37 (6110a31) into master (72bdf7f) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #37 +/- ##
=======================================
Coverage 98.43% 98.43%
=======================================
Files 8 8
Lines 511 511
=======================================
Hits 503 503
Misses 8 8
Impacted Files | Coverage Δ | |
---|---|---|
src/validator.js | 98.26% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 72bdf7f...6110a31. Read the comment docs.
Description
As already mentioned in #36, this PR tackles:
Trying to validate several third doses Moderna Green Pass Certificates with VISITORS_RSA scan mode, the validate function returns TEST_NEEDED uncorrectly. Doing some reverse engineering, we've found that third doses Green Pass Certificates are uncorrectly defined with
validationStatus = complete
, which represent just a complete cycle Green Pass Certificate (two doses or one dose for Johnson&Johnson), instead of avalidationStatus = booster
(check code atline 168
ofvalidator.js
).This issue happens because of a bad comparison of
last.doseNumber > last.totalSeriesOfDoses
. My personal Green Pass certificate (three doses) and some others havedoseNumber = 3
andtotalSeriesOfDoses = 3
, in this situation, the condition will be always false and all the newer Green Pass Certificates withtotalSeriesOfDoses = 3
will fail the validation.