SAO DomainParser gets caught in infinite loop
https://hg.tryton.org/sao/file/6.4/src/common.js#l1453
ending_clause
method evaluates incorrectly the is_leaf
by returning True
when last_element
is not an instance of Array
which is the reason a loop is created.
Tested on demo websites from 5.0 to 6.4, persists in all versions.
Firefox (crashes, so it's not noticed unless checking the console)
Uncaught InternalError: too much recursion
Chrome/Edge (crashes, so it's not noticed unless checking the console)
Uncaught RangeError: Maximum call stack size exceeded
Safari gets the window hang up and CPU utilization spikes up to 100%.
p.s: Thanks to Sergi that helped me to catch the bug and evaluate a possible fix quicker than if I sought to do it alone