django-daiquiri / daiquiri

A framework for the publication of scientific databases
https://escience.aip.de/daiquiri
Apache License 2.0
26 stars 8 forks source link

FEATURE: Allow only certain characters in the "table name" form in the query interface #78

Closed galkinAIP closed 1 year ago

galkinAIP commented 3 years ago

The "table name" currently allows spaces, etc. in the Query form. The form should allow only alphanumerical characters and "_", "-".

triole commented 3 years ago

The filter was added. Here is the commit: https://github.com/django-daiquiri/daiquiri/commit/325fde63921f4180d6fe84a709888b66123b3b31

jochenklar commented 2 years ago

Hi @galkinAIP , @triole , any reason why this was not merged before? I would add a setting for this though. Another possibility was to chain a django.core.validators.RegexValidator with r'^[\w]+\Z' with the current TableNameValidator (and get rid of the - as well).

Anyway, is it just to make cli access for admins better? Daiquiri seems to work fine with weird tablenames.

glaubervila commented 1 year ago

Hi @galkinAIP , @triole , any reason why this was not merged before? I would add a setting for this though. Another possibility was to chain a django.core.validators.RegexValidator with r'^[\w]+\Z' with the current TableNameValidator (and get rid of the - as well).

Anyway, is it just to make cli access for admins better? Daiquiri seems to work fine with weird tablenames.

Hi, I am testing daiquiri and in my environment, when there is space in the table name the download fails.

kimakan commented 1 year ago

Can confirm. Currently, whitespaces in the table name break the download.