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

rut.crypto_utils: RUT cleaning regex breaks RUTs with non-numeric check digit #700

Closed
jtrobles-cdd opened this issue Sep 25, 2024 · 0 comments · Fixed by #716
Closed

rut.crypto_utils: RUT cleaning regex breaks RUTs with non-numeric check digit #700

jtrobles-cdd opened this issue Sep 25, 2024 · 0 comments · Fixed by #716
Assignees
Labels
bug Something isn't working component: rut

Comments

@jtrobles-cdd
Copy link
Member

jtrobles-cdd commented Sep 25, 2024

The following regular expression causes the removal of all letters from a string, including the letter K.

subject_rut = re.sub(r'[^0-9-]', '', subject_rut_raw.decode('utf-8'))

Ref: https://app.shortcut.com/cordada/story/9821

@jtrobles-cdd jtrobles-cdd added bug Something isn't working component: rut labels Sep 25, 2024
@svillegas-cdd svillegas-cdd self-assigned this Oct 1, 2024
svillegas-cdd added a commit that referenced this issue Oct 1, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters, including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data` [See](https://github.com/cordada/fd-cl-data/blob/
  ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 1, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data` [See](https://github.com/cordada/fd-cl-data/blob/
  ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 1, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data` [See](https://github.com/cordada/fd-cl-data/blob/
  ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 1, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/
ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 1, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/
ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 1, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/
ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 2, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 2, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 2, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
svillegas-cdd added a commit that referenced this issue Oct 2, 2024
- The regular expression in `get_subject_rut_from_certificate_pfx` caused the removal of all letters,
including the letter K, from the RUTs.
- It has been updated to a regex that includes the letter K in certain RUTs.
- Added tests for RUTs that end with a `K`.
- Added a guide named `howto.md`, which explains how to create a valid `.der` certificate.
  Based on the guide in `FD-CL-Data`
  [See](https://github.com/cordada/fd-cl-data/blob/ba85835e81c857acbcc0498751c21335591b17b5/test_data/apps/sii_auth/certificate_pfx/howto.md).

Ref: #700
Ref: https://app.shortcut.com/cordada/story/9821
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component: rut
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants