-
Notifications
You must be signed in to change notification settings - Fork 493
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
Metadata Customization : url fieldType validator #9739
Comments
FWIW: My understanding is that // is potentially an issue on the server the URL is for, e.g. for https://archive.softwareheritage.org in your example, rather than a potential problem for Dataverse (since Dataverse isn't trying to parse/interpret a URL in metadata). |
I mean, the URL you mentioned definitely works when I click it: https://archive.softwareheritage.org/swh:1:dir:561bfe6698ca9e58b552b4eb4e56132cac41c6f9;origin=https://github.com/gem-pasteur/macsyfinder;visit=swh:1:snp:1bde3cb370766b10132c4e004c7cb377979928d1;anchor=swh:1:rev:868637fce184865d8e0436338af66a2648e8f6e1 So, yes, I think we should allow two slashes in URLs. And @qqmyers seems to think so too. @luddaniel please feel free to make a pull request! |
Hello there,
We are facing an issue regarding url
fieldType
validation while using uncommon url.Here is such url : https://archive.softwareheritage.org/swh:1:dir:561bfe6698ca9e58b552b4eb4e56132cac41c6f9;origin=https://github.com/gem-pasteur/macsyfinder;visit=swh:1:snp:1bde3cb370766b10132c4e004c7cb377979928d1;anchor=swh:1:rev:868637fce184865d8e0436338af66a2648e8f6e1 (generated by the website as a permalink)
Deeper analysis reveals that the url validator is based on
org.apache.commons.validator.routines.UrlValidator
and will fail on validation due to the//
near6f9;origin=https://githu
.UrlValidator as capability to be customized with options such as ALLOW_2_SLASHES that Allow two slashes in the path component of the URL :
The question now is : is it reasonable to add this option "for everyone and every url fields" ?
What do you think ?
Depending on the answer a PR could be considered.
The text was updated successfully, but these errors were encountered: