[rql, security] fix buggy rqlstr cleanup when some introduced snippet create an unresolvable query. Closes #2142041 stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 03 Jan 2012 12:21:44 +0100
branchstable
changeset 8147 335b358c7017
parent 8146 67b9b273b70d
child 8148 b7a195d54fd4
[rql, security] fix buggy rqlstr cleanup when some introduced snippet create an unresolvable query. Closes #2142041
rqlrewrite.py
--- a/rqlrewrite.py	Tue Dec 20 19:05:55 2011 +0100
+++ b/rqlrewrite.py	Tue Jan 03 12:21:44 2012 +0100
@@ -295,7 +295,7 @@
                     if parent is None:
                         self.current_statement().remove_node(new, undefine=True)
                     else:
-                        parent.parent.replace(or_, or_.children[0])
+                        grandpa.replace(or_, parent)
                         self._cleanup_inserted(new)
                     raise
                 else: