summaryrefslogtreecommitdiff
path: root/test/controllers/sessions_controller_test.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-07-10 23:54:38 +0200
committererdgeist <erdgeist@erdgeist.org>2026-07-10 23:54:38 +0200
commitab392d472c15eee3618cb7c02b2b4707151598b6 (patch)
tree70743f8fa0df9b75b0debb8f2724ea947ad99175 /test/controllers/sessions_controller_test.rb
parent7d6a665b896252537b8b8df2f15e204d04417231 (diff)
Prevent a staged parent move from crashing on its own descendant
publish_draft! called move_to_child_of before validating the new parent at all. Staging a node under one of its own descendants created a real, if transient, cycle in parent_id the instant that save landed -- and update_unique_names_of_children's after_save callback, which recurses down through parent_id with no cycle check and no depth limit, bounced between the two nodes forever, crashing the whole process with a SystemStackError rather than just producing bad data. Now rejected up front with a normal ActiveRecord::RecordInvalid.
Diffstat (limited to 'test/controllers/sessions_controller_test.rb')
0 files changed, 0 insertions, 0 deletions