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

Validate phone and Email call is not checking for the correct Nr and Phone number. #20622

Open
4 tasks
riyazuddinsyed opened this issue Apr 5, 2024 · 4 comments
Labels
bug Something isn't working Entities - Olga A label to filter on the tickets for the Entities based team that Olga is PO for. Priority3

Comments

@riyazuddinsyed
Copy link
Collaborator

riyazuddinsyed commented Apr 5, 2024

Describe the bug in the current situation
when the user tries to add an NR while filing an Alteration with an invalid email ID, then the Validate Api call allows an NR with a different email ID without any validations.

Steps to reproduce the behavior:

  1. Go to 'https://dev.edit.business.bcregistry.gov.bc.ca/BC0875385/alteration?accountid=2079'
  2. Login with BCREGA001.
  3. Search For 'BC0875385'
  4. Start an Alteration Filing.
  5. Now add 'NR 4573597' with any email id.
  6. Observe that the API call does not throw any validations.

Screenshots/ Visual Reference/ Source
Screen Shot 2024-04-05 at 12.19.58 PM.png

Screen Shot 2024-04-05 at 12.20.57 PM.png

Impact on user:

  • The NR would be accepted for any phone or email data entry.
  • Could be confusing for the user.
  • No security implications, the NR is secured by affiliation.

To Do List:

  • Determine if this validation should be needed/used here.
@riyazuddinsyed riyazuddinsyed added bug Something isn't working Entities - Olga A label to filter on the tickets for the Entities based team that Olga is PO for. labels Apr 5, 2024
@severinbeauvais severinbeauvais changed the title Validate phone and Email call is nit checking for the correct Nr and Phone number. Validate phone and Email call is not checking for the correct Nr and Phone number. Apr 11, 2024
@severinbeauvais
Copy link
Collaborator

severinbeauvais commented Apr 11, 2024

I think this is a loophole -- if the subject NR is affiliated to the current account then the entered phone/email are not verified.

Should we change the code to always verify the phone/email (even if not needed)? (But we don't know ahead of time if they are needed.) @NaveenHebbale @yuisotozaki

If a change is needed, it's in the Legal API (where the call to validate a name request is handled).

PS Here's an example where the NR is not affiliated to my account, and I entered the wrong phone number:

image.png

@Mihai-QuickSilverDev
Copy link
Collaborator

@yuisotozaki Would you be able to express an opinion on this, please?

@yuisotozaki
Copy link

I think the core of this issue is making sure that the user has access of some kind to the NR at the time of filing.

Scenario 1: The user already has access to the NR. I.e. it's in their MBR.
In this case, I would remove the phone/email check entirely at the time the user enter the NR number in the alteration filing.

Scenario 2: An alteration draft was saved with an NR, then the NR was removed from the user's MBR.
In this case, since we don't know if the NR was removed from the user's MBR for security purpose, the safest option is to ask for email/phone in the draft.

Scenario 3: User starts an alteration and adds an NR that is not on their MBR. In this case, we do ask for email/phone to essentially have the user add the NR to their MBR.

@severinbeauvais
Copy link
Collaborator

After discussion with Yui and James, we feel that the current priority is good. This is a loophole but doesn't do anything bad or block the user or allow the user to use the wrong NR; we are simply asking the user for an email/phone that they might not really have to enter, and we might allow the wrong email/phone if the NR is already affiliated. Anyway, probably not a big deal.

A nice solution might be a 2-step process: first prompt for NR number and check it with the API, then if needed prompt for email/phone. This is a medium amount of work but it is in a complex component, for what it's worth.

@OlgaPotiagalova What is your decision on how to proceed with this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Entities - Olga A label to filter on the tickets for the Entities based team that Olga is PO for. Priority3
Projects
None yet
Development

No branches or pull requests

4 participants