summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorMarius Mathiesen <marius.mathiesen@gmail.com>2009-05-12 08:52:44 +0200
committerMarius Mathiesen <marius.mathiesen@gmail.com>2009-05-12 08:56:19 +0200
commita364aa10a6e2c46c84f4848b079a78cc263984dd (patch)
treeb893baca6a65d4575590219939500366740937b7 /app/models
parent4e4c37084aa60f34fe4e7fe578ea4974a2609b6d (diff)
downloadgitorious-mainline-outdated-a364aa10a6e2c46c84f4848b079a78cc263984dd.zip
gitorious-mainline-outdated-a364aa10a6e2c46c84f4848b079a78cc263984dd.tar.gz
gitorious-mainline-outdated-a364aa10a6e2c46c84f4848b079a78cc263984dd.tar.bz2
Allowing an underscore in the comment of SSH keys.
Diffstat (limited to 'app/models')
-rw-r--r--app/models/ssh_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/ssh_key.rb b/app/models/ssh_key.rb
index 061ef1f..3440f78 100644
--- a/app/models/ssh_key.rb
+++ b/app/models/ssh_key.rb
@@ -23,7 +23,7 @@ class SshKey < ActiveRecord::Base
include ActiveMessaging::MessageSender
belongs_to :user
- SSH_KEY_FORMAT = /^ssh\-[a-z0-9]{3,4} [a-z0-9\+=\/]+ [a-z0-9_\.\-\ \+\/:]*(@[a-z0-9\.\-]*)?$/ims
+ SSH_KEY_FORMAT = /^ssh\-[a-z0-9]{3,4} [a-z0-9\+=\/]+ [a-z0-9_\.\-\ \+\/:]*(@[a-z0-9\.\-_]*)?$/ims
validates_presence_of :user_id, :key
validates_format_of :key, :with => SSH_KEY_FORMAT