NSLS-II / lsdc

LSDC - Life Sciences Data Collection
https://nsls-ii.github.io/lsdc
BSD 3-Clause "New" or "Revised" License
3 stars 14 forks source link

validate user-entered prefixes #49

Open JunAishima opened 3 years ago

JunAishima commented 3 years ago

Yesterday, on one of the beamlines, a user entered a prefix with a space. This, when combined with other directories to create, was misinterpreted as two separate directories that needed to be created instead of just one.

One way to handle this is to validate the input - the MX beamline scientists chat has agreed on all alphanumeric characters (a-z, A-Z, 0-9), plus _ and - (underscore and dash).

The text of the LSDC GUI also indicates a 40 character limit. This is not currently enforced, but will be added with this issue.

JunAishima commented 3 years ago

also note that https://github.com/NSLS-II/lsdc/commit/4f854f1ff8239d7f24d37ccf2ff64f19ff6f377d updates this fix to only allow up to 25 characters. longer prefixes caused problems when using ednaCol (this protocol adds 'ref-' to the prefix)