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

Consider using a regex for grant id to prevent strange chars #387

Open
michaelwood opened this issue Aug 14, 2024 · 2 comments
Open

Consider using a regex for grant id to prevent strange chars #387

michaelwood opened this issue Aug 14, 2024 · 2 comments

Comments

@michaelwood
Copy link
Member

Grant ids that contain strange chars have a way of breaking URIs and other analysis tools, it would be good to be able to prevent people from publishing the data. We can fix this at a tool level however this would mean that the identifiers aren't easily traceable from the original data.

ThreeSixtyGiving/grantnav#215
ThreeSixtyGiving/datastore#217
https://json-schema.org/understanding-json-schema/reference/regular_expressions

@michaelwood michaelwood changed the title Consider using a regex for grant id Consider using a regex for grant id to prevent strange chars Aug 14, 2024
@michaelwood
Copy link
Member Author

Note this would make the DQT additional check for these chars redundant

@mrshll1001
Copy link
Contributor

We can definitely explore this as part of work on Version 2.0.

I really like this as a means to limit a charset for a grantid such as excluding spaces, backslashes, etc. as it means that the data will be more parseable by standard coreutils as well as more complex systems such as grantnav.

We could go as far as to mandate a particular pattern/prefix for grant ids, but I think the benefit of that would be more limited. I like the idea of starting light by making sure that the grant ids contain friendly characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants