Allow the upload of SSH keys without the optional comment field

(fixes issue 531 - thanks William!)
This commit is contained in:
Thomas Keller 2010-09-14 14:22:34 +02:00
parent adae73080c
commit 0897c8608f

View File

@ -204,7 +204,7 @@ class IDF_Form_UserAccount extends Pluf_Form
return ''; return '';
} }
if (preg_match('#^ssh\-[a-z]{3}\s\S+\s\S+$#', $key)) { if (preg_match('#^ssh\-[a-z]{3}\s\S+==(\s\S+)?$#', $key)) {
$key = str_replace(array("\n", "\r"), '', $key); $key = str_replace(array("\n", "\r"), '', $key);
if (Pluf::f('idf_strong_key_check', false)) { if (Pluf::f('idf_strong_key_check', false)) {