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

[EasyUtils] Add Luhn validation to CreditCardNumberValidator #1344

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

voodooism
Copy link
Contributor

Q A
Bug fix? no
New feature? kind of
BC breaks? no
Deprecations? no
Tests pass? yes

Sometimes in the \EonX\EasyUtils\SensitiveData\StringSanitizers\CreditCardNumberStringSanitizer::sanitizeString method, the pan validator can decide that some sequence of digits is a valid pan. To avoid this let's check it by the Luhn algorithm

@eonx-space-to-github-reviews
Copy link

roman-eonx
roman-eonx previously approved these changes Jan 23, 2024
Copy link
Contributor

@roman-eonx roman-eonx left a comment

Choose a reason for hiding this comment

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

🎉👏💯

Secure code in this PR has been written to best practice standards and covers the following as a minimum. Please ticket if coded this way (also tick if not relevant to this code change):

  • Protect from Injection attacks
  • Protect data with proper input validation, and protect against buffer overflows, pointers/shared data
  • Protect with appropriate encryption and cryptography (E.g. Appropriate hashing, symmetric encryption used, ciphers) if applicable
  • Protect against XSS and CSRF
  • Ensure that pages, data access etc, are written with appropriate access control authorisation and authentication requirements
  • Ensure all important errors and business logic cases are handled
  • Ensure forwards and redirects are handled
  • Ensure no sensitive data is exposed and appropriate logging in place as required

See procedure for more details: PROC-010 Secure Coding Practices

akl-95
akl-95 previously approved these changes Jan 24, 2024
Copy link
Contributor

@akl-95 akl-95 left a comment

Choose a reason for hiding this comment

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

Code review complete. Excellent job!

Secure code in this PR has been written to best practice standards and covers the following as a minimum. Please ticket if coded this way (also tick if not relevant to this code change):

  • Protect from Injection attacks
  • Protect data with proper input validation, and protect against buffer overflows, pointers/shared data
  • Protect with appropriate encryption and cryptography (E.g. Appropriate hashing, symmetric encryption used, ciphers) if applicable
  • Protect against XSS and CSRF
  • Ensure that pages, data access etc, are written with appropriate access control authorisation and authentication requirements
  • Ensure all important errors and business logic cases are handled
  • Ensure forwards and redirects are handled
  • Ensure no sensitive data is exposed and appropriate logging in place as required

See procedure for more details: PROC-010 Secure Coding Practices

alexndlm
alexndlm previously approved these changes Jan 24, 2024
Copy link
Contributor

@alexndlm alexndlm left a comment

Choose a reason for hiding this comment

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

Thanks @voodooism. Nice work! Code review complete.

Secure code in this PR has been written to best practice standards and covers the following as a minimum. Please ticket if coded this way (also tick if not relevant to this code change):

  • Protect from Injection attacks
  • Protect data with proper input validation, and protect against buffer overflows, pointers/shared data
  • Protect with appropriate encryption and cryptography (E.g. Appropriate hashing, symmetric encryption used, ciphers) if applicable
  • Protect against XSS and CSRF
  • Ensure that pages, data access etc, are written with appropriate access control authorisation and authentication requirements
  • Ensure all important errors and business logic cases are handled
  • Ensure forwards and redirects are handled
  • Ensure no sensitive data is exposed and appropriate logging in place as required

See procedure for more details: PROC-010 Secure Coding Practices

@akl-95 akl-95 requested a review from natepage January 24, 2024 07:12
@voodooism voodooism dismissed stale reviews from alexndlm, akl-95, and roman-eonx via bf69f0e January 24, 2024 09:38
Copy link
Contributor

@roman-eonx roman-eonx left a comment

Choose a reason for hiding this comment

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

Code review approved. 👏 Keep up the good work!

Secure code in this PR has been written to best practice standards and covers the following as a minimum. Please ticket if coded this way (also tick if not relevant to this code change):

  • Protect from Injection attacks
  • Protect data with proper input validation, and protect against buffer overflows, pointers/shared data
  • Protect with appropriate encryption and cryptography (E.g. Appropriate hashing, symmetric encryption used, ciphers) if applicable
  • Protect against XSS and CSRF
  • Ensure that pages, data access etc, are written with appropriate access control authorisation and authentication requirements
  • Ensure all important errors and business logic cases are handled
  • Ensure forwards and redirects are handled
  • Ensure no sensitive data is exposed and appropriate logging in place as required

See procedure for more details: PROC-010 Secure Coding Practices

Copy link
Contributor

@roman-eonx roman-eonx left a comment

Choose a reason for hiding this comment

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

Thanks @voodooism. 🙌🎖️💪🏼

Secure code in this PR has been written to best practice standards and covers the following as a minimum. Please ticket if coded this way (also tick if not relevant to this code change):

  • Protect from Injection attacks
  • Protect data with proper input validation, and protect against buffer overflows, pointers/shared data
  • Protect with appropriate encryption and cryptography (E.g. Appropriate hashing, symmetric encryption used, ciphers) if applicable
  • Protect against XSS and CSRF
  • Ensure that pages, data access etc, are written with appropriate access control authorisation and authentication requirements
  • Ensure all important errors and business logic cases are handled
  • Ensure forwards and redirects are handled
  • Ensure no sensitive data is exposed and appropriate logging in place as required

See procedure for more details: PROC-010 Secure Coding Practices

@roman-eonx roman-eonx changed the title feature/add-luhn-validation-to-card-validator [EasyUtils] Add Luhn validation to CreditCardNumberValidator Jan 24, 2024
@roman-eonx roman-eonx removed the request for review from natepage January 24, 2024 10:54
@roman-eonx roman-eonx merged commit 687ab1c into master Jan 24, 2024
69 checks passed
@roman-eonx roman-eonx deleted the feature/add-luhn-validation-to-card-validator branch July 8, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants