Closed MichaelClerx closed 5 years ago
What would you like to constrain/allow?
Is there a need to constrain anything? Probably don't want whitespace at start/end, or entirely whitespace. And some maximum length. But beyond that?
There's another side of this: the URL pattern for file downloads needs to support allowed characters. That's what's causing this error:
ERROR 2019-05-23 09:18:54,752 django.request: Internal Server Error: /experiments/932/versions/1004/files.json
NoReverseMatch at /experiments/932/versions/1004/files.json
Reverse for 'file_download' with arguments '(932, 1004, 'oxmeta%3Amembrane_rapid_delayed_rectifier_potassium_current_conductance_histogram_gnuplot_data.csv')' not found. 1 pattern(s) tried: ['experiments/(?P<experiment_pk>\\d+)/versions/(?P<pk>\\d+)/download/(?P<filename>[\\w\\-.]+)$']
Those are probably sensible rules for us to use too then!