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

Feature Request/Idea: Review of used regex #10607

Open
jp-tosca opened this issue Jun 3, 2024 · 1 comment
Open

Feature Request/Idea: Review of used regex #10607

jp-tosca opened this issue Jun 3, 2024 · 1 comment
Labels
Type: Feature a feature request

Comments

@jp-tosca
Copy link
Contributor

jp-tosca commented Jun 3, 2024

Overview of the Feature Request

While working on the OpenAPI document fix on #10328 we did some validations using https://quobix.com/vacuum/ where we noticed that we were using some regular expressions that are not compatible with ECMA-262 "^[^:<>;#/\"\\*\\|\\?\\\\]*$" and raise an error.

Our endpoints work with JSON and JavaScript frontends like React so it would make sense to review and abide by the standard that regex uses for ECMA-262, https://json-schema.org/understanding-json-schema/reference/regular_expressions

Also as mentioned by @pdurbin there are some issues raised by Datalad about name conflicts on some languages: https://docs.datalad.org/projects/dataverse/en/latest/settingup.html#dataverse-limitations

"Dataverse will not accept names like Änderungen or Déchiffrer, due to the Ä and é in them."

@jp-tosca jp-tosca added the Type: Feature a feature request label Jun 3, 2024
@pdurbin
Copy link
Member

pdurbin commented Jun 3, 2024

Related:

Also, the regex that is giving us the most trouble is the one for the "label" (filename) for the FileMetadata entity. That's the gnarly one JP mentioned above. Here it is in context:

https://github.com/IQSS/dataverse/blob/v6.2/src/main/java/edu/harvard/iq/dataverse/FileMetadata.java#L72

I'll leave a comment on this issue from DataLad to at least let them know we hear them:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature a feature request
Projects
None yet
Development

No branches or pull requests

2 participants