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

BR-51 check in UBL is bogus #341

Closed
phax opened this issue Mar 24, 2023 · 0 comments
Closed

BR-51 check in UBL is bogus #341

phax opened this issue Mar 24, 2023 · 0 comments
Assignees
Milestone

Comments

@phax
Copy link
Collaborator

phax commented Mar 24, 2023

The check is lacking a normalize-space call:

    <rule context="cac:PaymentMeans/cac:CardAccount">
      <assert id="BR-51" flag="warning" test="string-length(cbc:PrimaryAccountNumberID)&lt;=10">[BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown.</assert>
    </rule>

We recommend to change the test to:

    <rule context="cac:PaymentMeans/cac:CardAccount/cbc:PrimaryAccountNumberID">
      <assert id="BR-51" flag="warning" test="string-length(normalize-space(.))&lt;=10">[BR-51]-In accordance with card payments security standards an invoice should never include a full card primary account number (BT-87). At the moment PCI Security Standards Council has defined that the first 6 digits and last 4 digits are the maximum number of digits to be shown.</assert>
    </rule>

a) Make the context as narrow as possible
b) Use normalize-space for the value to omit false positives for values like <cbc:PrimaryAccountNumberID> 1234567890 </cbc:PrimaryAccountNumberID>

@oriol oriol closed this as completed in 4338f3c Mar 29, 2023
@oriol oriol added this to the 1.3.10 milestone Mar 29, 2023
@oriol oriol self-assigned this Mar 29, 2023
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

No branches or pull requests

2 participants