[Xfce4-commits] <moka:nick/maintainer-improvements> Fix ssh key saving.
Nick Schermer
noreply at xfce.org
Sat Oct 8 20:48:01 CEST 2011
Updating branch refs/heads/nick/maintainer-improvements
to a1cc6b6dfe842aa3e97d7505f974b02b13c81df6 (commit)
from 0025740faa939632bb83e85ac82575d837932e24 (commit)
commit a1cc6b6dfe842aa3e97d7505f974b02b13c81df6
Author: Nick Schermer <nick at xfce.org>
Date: Sat Oct 8 20:01:00 2011 +0200
Fix ssh key saving.
TODO | 1 -
lib/controllers/maintainers.rb | 2 +-
lib/views/maintainer_profile.haml | 9 +++++++--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/TODO b/TODO
index ed77252..22a543c 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,3 @@
- Registration
- Send verification email on email address change and ssk key change.
-- Password recovery.
- Tool to generate gitolit config file and ssh key files.
diff --git a/lib/controllers/maintainers.rb b/lib/controllers/maintainers.rb
index 77e6bc6..2162a78 100755
--- a/lib/controllers/maintainers.rb
+++ b/lib/controllers/maintainers.rb
@@ -36,7 +36,7 @@ module Moka
pubkeys = []
params[:pubkeys].split("\n").each do |key|
key = key.strip
- pubkeys.push(key) if not key.empty?
+ pubkeys.push(key) if not key.empty? and key.start_with? "ssh-"
end
if authentication_user.is_admin
diff --git a/lib/views/maintainer_profile.haml b/lib/views/maintainer_profile.haml
index bf16885..7726a1d 100644
--- a/lib/views/maintainer_profile.haml
+++ b/lib/views/maintainer_profile.haml
@@ -16,9 +16,14 @@
%input{:type => "text", :name => "realname", :value => @maintainer.realname}
%p
%label{:for => "pubkeys"} SSH public-keys:
- %textarea{:name => "pubkeys", :rows => "5", :wrap => "off", :value => @maintainer.pubkeys}
+ %textarea{:name => "pubkeys", :rows => "5", :wrap => "off"}
+ #{@maintainer.pubkeys}
+ %br
+ Each line of the public keys should start with ssh-dsa or ssh-rsa else the key is not saved.
%hr
- %p Leave the password fields empty if you don't want to set a new password. The password needs to be at least 6 characters long.
+ %p
+ Leave the password fields empty if you don't want to set a new password.
+ The password needs to be at least 6 characters long.
- if env[:error][:newpassword]
%p.error.quote #{env[:error][:newpassword]}
%p
More information about the Xfce4-commits
mailing list