summaryrefslogtreecommitdiff
path: root/app/models/pgp_key.rb
diff options
context:
space:
mode:
authorazul <azul@leap.se>2014-05-30 18:01:54 +0200
committerazul <azul@leap.se>2014-05-30 18:01:54 +0200
commit568a5c243f0a0ef90807c96b19643ec341994bbb (patch)
tree1b921c5243e51d6aaa413ed71455d51f86f94353 /app/models/pgp_key.rb
parent1d0d61389011a8d0d169bc139590d90a6fbbac60 (diff)
parentbbe7b3b7deb2b44d34f7c39dda2c3db284e2bf10 (diff)
Merge pull request #168 from azul/bugfix/fix-login-validations
Fix login validations
Diffstat (limited to 'app/models/pgp_key.rb')
-rw-r--r--app/models/pgp_key.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/pgp_key.rb b/app/models/pgp_key.rb
index 66f8660..3384f4c 100644
--- a/app/models/pgp_key.rb
+++ b/app/models/pgp_key.rb
@@ -25,9 +25,10 @@ class PgpKey
# allow comparison with plain keyblock strings.
def ==(other)
+ return false if (self.present? != other.present?)
self.equal?(other) or
# relax the comparison on line ends.
- self.to_s.tr_s("\n\r", '') == other.tr_s("\r\n", '')
+ self.to_s.tr_s("\n\r", '') == other.tr_s("\n\r", '')
end
protected