Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VH] Schema version mismatch results in failed instead of open (inconsistent with iOS) #40

Open
mlenkeit opened this issue Jul 19, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@mlenkeit
Copy link
Collaborator

Describe the bug

If the SchemaVersion field of a rule is greater or equal then the ver field of a DCC (e.g. SchemaVersion=1.3.0 and ver=1.0.0), the rule results in fail:

hcertVersion.isGreaterOrEqualThan(schemaVersion) ->
when (jsonLogicValidator.isDataValid(
rule.logic,
dataJsonNode
)) {
true -> Result.PASSED
false -> Result.FAIL
else -> Result.OPEN
}
else -> Result.FAIL

Expected behaviour

The result should result in open, just like it is implemented on iOS:

https://github.com/eu-digital-green-certificates/dgc-certlogic-ios/blob/8b7f86a2aed4f2c60dd2c7c4f28eb129d9fe379d/Sources/CertLogic/CertLogic.swift#L52-L54

Steps to reproduce the issue

Apply a rule with SchemaVersion set to 1.3.0 (e.g. Netherlands) against a DCC with ver set to 1.0.0 (e.g. most German DCCs)

Technical details

n/a

Possible Fix

map to open instead of fail

Additional context

@mlenkeit mlenkeit added the bug Something isn't working label Jul 19, 2021
@oleksandrsarapulovgl
Copy link
Contributor

PR: #41

@oleksandrsarapulovgl
Copy link
Contributor

@oleksandrsarapulovgl
Copy link
Contributor

Hi @mlenkeit ! Thank you for finding the issue. May I close it now?

@MYMY33
Copy link

MYMY33 commented Dec 25, 2021

Ciao e possibile avere un qr code grazie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants