to_code
does not check whether components names are valid Python variable names
#3855
Labels
1.x
P3
Low priority, leave it in the backlog
topic:pipeline
topic:security
relevant to Haystack's threat model
type:bug
Something isn't working
wontfix
This will not be worked on
Describe the bug
Pipeline.to_code
trusts blindly that the name of each component can be used as a valid Python variable name.Solution:
to_code
should clean the compoent names before using them.unicodedata.category()
to filter out control characters, for example.@tstadel
The text was updated successfully, but these errors were encountered: