1. &renumber_list is called with wrong arguments in &delete_alias and &modify_alias function.
It is erroneously assumed, that alias to be deleted or modified is one lined (line == eline). This leads to %list_aliases_cache corruption and possible corruption of aliases file during batch aliases delete in delete_aliases.cgi.
2. &renumber_list works wrong, when called from &modify_alias with multi lined aliases (line != eline).
When alias becomes multi lined (e.g. comment added), 'eline' of modified alias cache entity is greater than 'eline' of &renumber_list position-object argument. This triggers 'eline' modification rule in &renumber_list.
You may check this using Data::Dumper. Currently, it does not lead to any problem, since &modify_alias is not called in batch mode.
Attached is a patch fixing these problems. It tested on alias deletion and modification operations. It is NOT tested on all other operations where &renumber_list is used.
Log in to post a comment.