A server-side block can be a useful temporary mitigation, but the best solution is to apply an official patch or upgrade as soon as one is available. Also consider using parameterized queries and validating the tmpl_id input rather than relying solely on Apache rules.
