Item13327: Deep recursion at wrong web rename
Priority: Normal
Current State: Closed
Released In: 2.0.0
Target Release: major
Deep recursion at the web rename
How to reproduce
- Create web Tutu
- Go to WebPreferences
- click rename web
- set the new name to Tutux
- Choose the new parent itself (Tutu)
- click rename
Page long error message to user, and in the log:
[Tue Mar 24 22:31:12 2015] rename: Caught Deep Recursion Condition: /me/fw/utest2/foswiki/core/data/Tutu contains /me/fw/utest2/foswiki/core/data/Tutu/Tutux at /me/fw/utest2/foswiki/core/lib/Foswiki/Store/PlainFile.pm line 1313.
Of course, it is a stupidity trying rename and set the parent itself, but in the drop-down should
not be shown itself's name - in this case Tutu.
--
JozefMojzis - 24 Mar 2015
I've added a check in
UI::Rename
to prevent setting the new parent to either the old or new webname. It's not as easy to remove the current web from the parent list. it would require adding a new parameter to the
WEBLIST macro - to exclude the current web. And it wouldn't cover the case of trying to set the parent to the new webname.
--
GeorgeClark - 16 Apr 2015