Add runtime type checks to f_string_indexes

This fixes CVE-2026-39956.
This commit is contained in:
tlsbollei authored and itchyny committed 2026-04-08 21:43:46 +02:00
1 parent e47e56d226
commit fdf8ef0f08
2 files changed
+17

No files matched your search

+9
View File
@@ -1549,6 +1549,15 @@ split("")
"xababababax"
[1,7,[1,3,5,7]]
# _strindices is used by indices/1 but is callable
try _strindices("abc") catch .
123
"number (123) cannot be searched, as it is not a string"
try _strindices(123) catch .
"abc"
"number (123) is not a string"
# trim
# \u000b is vertical tab (\v not supported by json)
map(trim), map(ltrim), map(rtrim)