fix remove_line function to protect regex
The remove_line function is intended to remove keys from key files (authorized_keys and known_hosts). For known_hosts, it needs to be able to remove lines with matching host/key pairs. This is currently being done with the following regex:
${host}.*${key}
However, this is potentially problematic if the host and or key has characters that are interpreted as part of the regex. Is there a simple way to protect against this? What are our options?
(from redmine: created on 2010-10-19, closed on 2010-10-25)