Open
Description
The register objects code uses the builtin eval
function twice to assemble a set of valid characters for object IDs, for example:
The idea is that the user can specify the list of admissible ID characters using a Python expression in the configuration file:
drs-filer/drs_filer/config.yaml
Line 69 in bf420d0
This is unsafe since it allows executing arbitrary code (try specifying id_charset: 'import os; os.system("rm -rf /")'
in the config file), and also somewhat unnecessary in my opinion. I would recommend just specifying the list of admissible characters directly:
id_charset: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_~'
Metadata
Metadata
Assignees
Labels
No labels
Activity