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

Regexp allow invalid Orcid prefix #169

Open
leomendoza123 opened this issue Apr 29, 2020 · 2 comments
Open

Regexp allow invalid Orcid prefix #169

leomendoza123 opened this issue Apr 29, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@leomendoza123
Copy link
Member

leomendoza123 commented Apr 29, 2020

Regexp ORCID_REGEXP and ORCID_URI_REGEXP used to validate ORCID IDs allow any string at the begging of the input.

This makes the UI accept wrong inputs like:

https://INVALID.orcid.org/0000-0002-9361-1905 or INVALID!0000-0002-9361-1905

This will currently affect validation on the advance search and signing

@leomendoza123 leomendoza123 added the bug Something isn't working label Apr 29, 2020
@DanielPalafox
Copy link
Member

Currently, in the actual UI in production, you can put anything before the ORCID ID as Leo explains. We just need to accept valid ORCID ids or valid full URLs and with this, we will avoid making unnecessary calls to the backend.

@leomendoza123
Copy link
Member Author

leomendoza123 commented Apr 29, 2020

Yes on the old sign in it will even allow you to successfully sign with an invalid string (if it contains a valid Orcid Id)

image

We should decide if we really want to validate a perfect ORCID ID for the signin since the backend understands the call.... maybe we want to keep allowing that there.

On the other hand, I believe we need a good validation on most other features.

@leomendoza123 leomendoza123 self-assigned this Jun 5, 2020
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

2 participants