[ARVADOS] updated: e1ed5c20e3edc31c7aefe3257679b0db6f3c3316

git at public.curoverse.com git at public.curoverse.com
Fri Jan 17 16:03:31 EST 2014


Summary of changes:
 services/api/app/models/authorized_key.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

       via  e1ed5c20e3edc31c7aefe3257679b0db6f3c3316 (commit)
      from  5a2dd6a86ac170ea709b60c7f243ba9216cd0843 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit e1ed5c20e3edc31c7aefe3257679b0db6f3c3316
Author: Tom Clegg <tom at curoverse.com>
Date:   Fri Jan 17 13:02:35 2014 -0800

    Accept DSA public keys ("ssh-dss"), not just RSA.
    
    refs #1880

diff --git a/services/api/app/models/authorized_key.rb b/services/api/app/models/authorized_key.rb
index 14db0b1..a6bc065 100644
--- a/services/api/app/models/authorized_key.rb
+++ b/services/api/app/models/authorized_key.rb
@@ -33,10 +33,10 @@ class AuthorizedKey < ArvadosModel
 
   def public_key_must_be_unique
     if self.public_key
-      key = /ssh-rsa [A-Za-z0-9+\/]+/.match(self.public_key)
+      key = /^ssh-(rsa|dss) [A-Za-z0-9+\/=\+]+\b/.match(self.public_key)
       
       if not key
-        errors.add(:public_key, "does not appear to be a valid ssh-rsa key")
+        errors.add(:public_key, "does not appear to be a valid ssh-rsa or dsa public key")
       else
         # Valid if no other rows have this public key
         if self.class.where('public_key like ?', "%#{key[0]}%").any?

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list