[erlang-bugs] R15B01: PUBLIC_KEY: unable to decode auth_keys/pubkeys with comments
Stefan Zegenhagen
stefan.zegenhagen@REDACTED
Thu Jun 28 11:25:28 CEST 2012
Dear all,
the public_key application fails to decode SSH public keys from *.pub
files or the authorized_keys file when the key has comments with
whitespace in between.
The key file is split at whitespace boundaries and the function
mend_split() in pubkey_ssh.erl is used to extract the relevant pieces
(KeyType, KeyData, ...).
When the key comment contains whitespace, the mend_split() function
fails to merge the pieces of the comment into a single string and causes
badmatch exceptions in do_openssh_decode/3.
Since the format of the "known_hosts" file and the "authorized_keys" or
*.pub files is fundamentally different, it might be necessary to have
different functions to parse them.
Kind regards,
--
Dr. Stefan Zegenhagen
arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany
Tel: +49 511 277-2734
Fax: +49 511 277-2709
Email: stefan.zegenhagen@REDACTED
Web: www.arcutronix.com
*Synchronize the Ethernet*
General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.
Please consider the environment before printing this message.
More information about the erlang-bugs
mailing list