Theano / Theano

Theano was a Python library that allows you to define, optimize, and evaluate mathematical expressions involving multi-dimensional arrays efficiently. It is being continued as PyTensor: www.github.com/pymc-devs/pytensor

Home Page:https://www.github.com/pymc-devs/pytensor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect Regular Expression Ranges

Onyx2406 opened this issue · comments

In the file theano/gof/cmodule.py, there are overly broad or overlapping ranges in the regular expressions used in the re.findall and re.search functions. These could lead to unintended matches that could disrupt the execution of the code or potentially even create security vulnerabilities.

Steps to Reproduce

The bug is located in the code block starting at line 2395 in theano/gof/cmodule.py. The exact regular expressions causing the issue are:

-l["."-_a-zA-Z0-9]* in the re.findall function

Expected Behavior

The regular expressions should not have overly broad or overlapping ranges. They should be clear and unambiguous and match only the expected characters.