1. An action challenging the validity of a conversion plan, or any part of a conversion plan, shall not be commenced more than thirty days following the date of approval by the commissioner, unless an application for rehearing is filed pursuant to section 17A.16, subsection 2. If an application for rehearing is filed, then such action must be filed within thirty days after that application is denied or deemed denied or, if the application is granted, within thirty days after the issuance of the commissioner’s final decision on rehearing.
 2. The successor stock company or any defendant may require the plaintiff in such an action to give security for the reasonable attorney fees which may be incurred by any party to the action. The amount of the security may be increased or decreased in the discretion of the court having jurisdiction if a showing is made that the security provided is or may become inadequate or excessive.