Akascape / CTkListbox

A simple listbox for customtkinter (extenstion/add-on)
MIT License
130 stars 14 forks source link

ast.literal_eval() instead of eval() ? #61

Open jipen opened 1 month ago

jipen commented 1 month ago

Not a proper issue but just a suggestion to avoid security issues:

Instead of (line 94 in ctk_listbox.py):

values = list(eval(self.listvariable.get()))

Perhaps:

import ast
...
values = list(ast.literal_eval(self.listvariable.get()))

could be better ?

Tested on my own application and it works.