cubicweb #615848 security related crash [resolved]

trace:

2010-01-11 14:42:03 - (cubicweb.web) ERROR: NameError("global name 'new' is not defined",)
Traceback (most recent call last):
 File "/home/auc/src/fcw/cubicweb/web/application.py", line 325, in main_publish
   result = controller.publish(rset=rset)
 File "/home/auc/src/fcw/cubicweb/web/views/basecontrollers.py", line 102, in publish
   rset=rset, view=view)
 File "/home/auc/src/fcw/cubicweb/cwvreg.py", line 188, in main_template
   res = self.render(oid, req, **kwargs)
 File "/home/auc/src/fcw/cubicweb/cwvreg.py", line 90, in render
   return obj.render(**kwargs)
 File "/home/auc/src/fcw/cubicweb/view.py", line 152, in render
   view_func(**context)
 File "/home/auc/src/fcw/cubicweb/web/views/basetemplates.py", line 125, in call
   view.render(w=w)
 File "/home/auc/src/fcw/cubicweb/view.py", line 152, in render
   view_func(**context)
 File "/home/auc/src/fcw/cubicweb/view.py", line 178, in call
   self.wview(self.id, rset, row=i, **kwargs)
 File "/home/auc/src/fcw/cubicweb/view.py", line 234, in wview
   self.view(__vid, rset, __fallback_vid, w=self.w, **kwargs)
 File "/home/auc/src/fcw/cubicweb/appobject.py", line 421, in view
   rset=rset, **kwargs)
 File "/home/auc/src/fcw/cubicweb/cwvreg.py", line 90, in render
   return obj.render(**kwargs)
 File "/home/auc/src/fcw/cubicweb/view.py", line 152, in render
   view_func(**context)
 File "/home/auc/src/fcw/cubicweb/web/views/primary.py", line 45, in cell_call
   self.render_entity(entity)
 File "/home/auc/src/fcw/cubicweb/web/views/primary.py", line 64, in render_entity
   self.render_entity_relations(entity)
 File "/home/auc/src/fcw/cubes/pegase/views/node.py", line 20, in render_entity_relations
   od_rset = self.req.execute(self.rql % ('origin', 'destination'), subst)
 File "/home/auc/src/fcw/cubicweb/dbapi.py", line 309, in execute
   return self.cursor.execute(*args, **kwargs)
 File "/home/auc/src/fcw/cubicweb/dbapi.py", line 668, in execute
   parameters, eid_key, build_descr)
 File "/home/auc/src/fcw/cubicweb/server/repository.py", line 611, in execute
   build_descr)
 File "/home/auc/src/fcw/cubicweb/server/querier.py", line 647, in execute
   self._planner.build_plan(plan)
 File "/home/auc/src/fcw/cubicweb/server/ssplanner.py", line 36, in build_plan
   for step in build_plan(plan, plan.rqlst):
 File "/home/auc/src/fcw/cubicweb/server/ssplanner.py", line 45, in build_select_plan
   plan.preprocess(rqlst)
 File "/home/auc/src/fcw/cubicweb/server/querier.py", line 196, in preprocess
   self._insert_security(union, noinvariant)
 File "/home/auc/src/fcw/cubicweb/server/querier.py", line 270, in _insert_security
   rewrite(myrqlst, lcheckdef, lchecksolutions, self.args)
 File "/home/auc/src/fcw/cubicweb/rqlrewrite.py", line 154, in rewrite
   self.insert_snippets(snippets)
 File "/home/auc/src/fcw/cubicweb/rqlrewrite.py", line 199, in insert_snippets
   new = self.insert_snippet(varmap, rqlexpr.snippet_rqlst, parent)
 File "/home/auc/src/fcw/cubicweb/rqlrewrite.py", line 221, in insert_snippet
   return self._insert_snippet(varmap, parent, new)
 File "/home/auc/src/fcw/cubicweb/rqlrewrite.py", line 229, in _insert_snippet
   self.insert_scope = self.snippet_subquery(varmap, new)
 File "/home/auc/src/fcw/cubicweb/rqlrewrite.py", line 330, in snippet_subquery
   self.select.remove_subquery(new, undefine=True)
NameError: global name 'new' is not defined

also note that remove_subquery does NOT have an undefine parameter

priorityimportant
typebug
done in3.5.12
load0.100
load left0.000
closed by<not specified>