dynamicexpresso / DynamicExpresso

C# expressions interpreter
http://dynamic-expresso.azurewebsites.net/
MIT License
2.02k stars 379 forks source link

DetectIdentifiers infinite loop #336

Closed israellot closed 3 days ago

israellot commented 4 days ago

The current release infinite loops on this snippet

[Test]
public void Detect_identifiers_bug_test()
{
    var target = new Interpreter(InterpreterOptions.DefaultCaseInsensitive | InterpreterOptions.LateBindObject);
    var detectedIdentifiers = target.DetectIdentifiers("ago(w(counter_lastts_chest_game_over_bonus)).minutes<1");
}

The master branch as it is right now has it fixed, so i'm assuming that's either https://github.com/dynamicexpresso/DynamicExpresso/commit/a9bdac0b553e89def98704ed062672a44366be5c or https://github.com/dynamicexpresso/DynamicExpresso/commit/85270acf1179c630b318613b1e9a2dbb8c715f0a

A new release would be adivisable as users updating the nuget package might face this issue live.

davideicardi commented 3 days ago

Thank you for the feedback, I'm Just releasing a new version, v2.17.2.