Created on 2022-05-09.15:46:18 by hodeinavarro, last changed 2 months ago by roundup-bot.
New changeset f3de06c9168d by Cédric Krier in branch '6.4': Test for sub-domain instead of not leaf in domain parser https://hg.tryton.org/sao/rev/f3de06c9168d New changeset 45e2c8de9e20 by Cédric Krier in branch '6.2': Test for sub-domain instead of not leaf in domain parser https://hg.tryton.org/sao/rev/45e2c8de9e20 New changeset d2a5f3cf8da6 by Cédric Krier in branch '6.0': Test for sub-domain instead of not leaf in domain parser https://hg.tryton.org/sao/rev/d2a5f3cf8da6 New changeset 01f83a490bf9 by Cédric Krier in branch '5.0': Test for sub-domain instead of not leaf in domain parser https://hg.tryton.org/sao/rev/01f83a490bf9
New changeset 99924f9dd683 by Cédric Krier in branch 'default': Test for sub-domain instead of not leaf in domain parser https://hg.tryton.org/tryton-env/rev/99924f9dd683
New changeset 07fec0d45308 by Cédric Krier in branch 'default': Add test for domain completion ending with or https://hg.tryton.org/tryton/rev/07fec0d45308
New changeset 8e38c5eebb96 by Cédric Krier in branch 'default': Test for sub-domain instead of not leaf in domain parser https://hg.tryton.org/sao/rev/8e38c5eebb96
Here is review411171004 that solves the problem in a generic way.
Go into any "FILTERS" text box and type a field with a value then as soon as you end the keyword "or" or "and" it will raise the mentioned exceptions.
Ex. go into Parties and type: "Name: Albright or"
Could you please provide a scenario to reproduce your problem?
Thank you for raising the bug and provide a patch for it.
P.S: Please assign the issue to yourself if you plan to work on it ;-)
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
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-06-02 13:43:20 | roundup-bot | set | keyword:
- backport messages: + msg76923 |
2022-05-19 21:59:01 | roundup-bot | set | messages: + msg76723 |
2022-05-19 21:58:53 | roundup-bot | set | messages: + msg76721 |
2022-05-19 21:58:48 | roundup-bot | set | messages:
+ msg76719 nosy: + roundup-bot status: testing -> resolved |
2022-05-17 17:44:50 | reviewbot | set | messages: + msg76702 |
2022-05-17 17:40:52 | ced | set | assignedto: hodeinavarro -> ced messages: + msg76701 reviews: 431091003 -> 431091003,411171004 status: in-progress -> testing |
2022-05-12 01:15:42 | ced | link | issue11477 superseder |
2022-05-11 23:17:45 | hodeinavarro | set | messages: + msg76600 |
2022-05-11 23:12:35 | ced | set | messages:
+ msg76597 nosy: + ced |
2022-05-11 21:25:08 | reviewbot | set | messages: + msg76596 |
Showing 10 items. Show all history (warning: this could be VERY long)