public
Description: The open source social networking platform in Ruby on Rails from the author of RailsSpace
Homepage: http://insoshi.com
Clone URL: git://github.com/insoshi/insoshi.git
Search Repo:
Added RAILS_ROOT to RSA key read
Michael Hartl (author)
Tue May 13 14:45:48 -0700 2008
commit  692e46b9c232b5e1345586a45dfb3069c6b5ccaa
tree    d483dabb0090ce6ea320d8135824b0250209167a
parent  ca9148fbba6c9bd354fa42ea32af5549eb18af2a
...
250
251
252
253
 
254
255
256
...
259
260
261
262
 
263
264
265
...
250
251
252
 
253
254
255
256
...
259
260
261
 
262
263
264
265
0
@@ -250,7 +250,7 @@
0
   end
0
 
0
   def self.encrypt(password)
0
- Crypto::Key.from_file('rsa_key.pub').encrypt(password)
0
+ Crypto::Key.from_file("#{RAILS_ROOT}/rsa_key.pub").encrypt(password)
0
   end
0
 
0
   # Encrypts the password with the user salt
0
@@ -259,7 +259,7 @@
0
   end
0
 
0
   def decrypt(password)
0
- Crypto::Key.from_file('rsa_key').decrypt(password)
0
+ Crypto::Key.from_file("#{RAILS_ROOT}/rsa_key").decrypt(password)
0
   end
0
 
0
   def authenticated?(password)

Comments

    No one has commented yet.