--- src/common/include/account.php | 2 +- src/www/account/editsshkeys.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/common/include/account.php b/src/common/include/account.php index ce5dded..9a83ab2 100644 --- a/src/common/include/account.php +++ b/src/common/include/account.php @@ -321,7 +321,7 @@ function checkKeys($keys) { /* The encoded key is made of 0-9, A-Z ,a-z, +, / (base 64) characters, ends with zero or up to three '=' and the length must be >= 512 bits (157 base64 characters). The whole key ends with an optional comment. */ - if ( preg_match("@^(((no-port-forwarding|no-X11-forwarding|no-agent-forwarding|no-pty|command=\"[^\"]+\"|from=\"?[A-Za-z0-9\.-]+\"?),?)*\s+)?ssh-(rsa|dss)\s+[A-Za-z0-9+/]{157,}={0,2}(\s+.*)?$@", $key) === 0 ) { // Warning: we must use === for the test + if ( preg_match("@^(((no-port-forwarding|no-X11-forwarding|no-agent-forwarding|no-pty|command=\"[^\"]+\"|from=\"?[A-Za-z0-9\.-]+\"?),?)*\s+)?ssh-(ed25519|ecdsa|rsa|dss)\s+[A-Za-z0-9+/]{157,}={0,2}(\s+.*)?$@", $key) === 0 ) { // Warning: we must use === for the test $error_msg = sprintf(_('The following key has a wrong format: |%s|. Please, correct it by going back to the previous page.'), htmlspecialchars($key)); session_redirect('/account/'); diff --git a/src/www/account/editsshkeys.php b/src/www/account/editsshkeys.php index 1e2a184..b400c51 100644 --- a/src/www/account/editsshkeys.php +++ b/src/www/account/editsshkeys.php @@ -65,10 +65,10 @@ if (count($sshKeysArray)) { echo $HTML->openForm(array('action' => util_make_uri('/account/?action=addsshkey'), 'method' => 'post', 'enctype' => 'multipart/form-data')); echo html_e('h2', array(), _('Add a new ssh key')); echo html_e('p', array(), _('To avoid having to type your password every time for your SSH developer account, you may upload your public key(s) here and they will be placed on the server in your ~/.ssh/authorized_keys file. Uploaded SSH keys are effective <em>immediately</em>.')); -echo html_e('p', array(), _('To generate a public key, run the program \'ssh-keygen\' (you can use both protocol 1 or 2). The public key will be placed at \'~/.ssh/identity.pub\' (protocol version 1) and \'~/.ssh/id_dsa.pub\' or \'~/.ssh/id_rsa.pub\' (protocol version 2). Read the ssh documentation for further information on sharing keys.')); +echo html_e('p', array(), _('To generate a public key, run the program \'ssh-keygen\' (you can use both protocol 1 or 2). The public key will be placed at \'~/.ssh/identity.pub\' (protocol version 1) and \'~/.ssh/id_dsa.pub\', \'~/.ssh/id_rsa.pub\', \'~/.ssh/id_ecdsa.pub\' or \'~/.ssh/id_ed25519.pub\' (protocol version 2). Read the ssh documentation for further information on sharing keys.')); echo html_e('p', array(), html_e('em', array(), _('Important: Make sure there are no line breaks. After submitting, verify that the number of keys in your file is what you expected.'))); echo html_e('textarea', array('rows' => 10, 'cols' => 80, 'name' => 'authorized_key', 'style' => 'width:90%;'), '', false); -echo html_e('p', array(), _('Or upload your \'~/.ssh/identity.pub\' (protocol version 1) or \'~/.ssh/id_dsa.pub\' or \'~/.ssh/id_rsa.pub\' (protocol version 2)')); +echo html_e('p', array(), _('Or upload your \'~/.ssh/identity.pub\' (protocol version 1) or \'~/.ssh/id_dsa.pub\', \'~/.ssh/id_rsa.pub\', \'~/.ssh/id_ecdsa.pub\' or \'~/.ssh/id_ed25519.pub\' (protocol version 2)')); echo html_e('input', array('type' => 'file', 'name' => 'uploaded_filekey')); echo html_e('p', array(), html_e('input', array('type' => 'submit', 'name' => 'submit', 'value' => _('Add')))); echo $HTML->closeForm(); -- 2.1.4 _______________________________________________ Fusionforge-general mailing list Fusionforge-general@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-general