irods / irods_capability_automated_ingest

Other
12 stars 15 forks source link

Sanitize job names before using in `custom_event_handler` cache file names #170

Closed alanking closed 2 years ago

alanking commented 2 years ago

The custom_event_handler takes an event handler that has been stored in Redis and made unique through a combination of a uuid and the job name with which the event handler is associated.

The file is then imported via importlib. The job name is able to contain characters which are not allowed in a module name. For instance, the job names used in the test suite contain dots, which cause the import to fail as importlib thinks this is the name of a module. The job names should be sanitized before turning them into filenames.