commonthread-rails 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/commonthread-rails.gemspec +1 -1
- data/lib/commonthread/encrypter.rb +2 -2
- data/lib/commonthread/filters.rb +1 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/commonthread-rails.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
class Encrypter
|
2
2
|
def self.encrypt(input)
|
3
|
-
return nil
|
3
|
+
return nil unless input.is_a?(String)
|
4
4
|
Base64.encode64(self.blowfish.encrypt_string(input))
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.decrypt(input)
|
8
|
-
return nil
|
8
|
+
return nil unless input.is_a?(String)
|
9
9
|
self.blowfish.decrypt_string(Base64.decode64(input))
|
10
10
|
end
|
11
11
|
|
data/lib/commonthread/filters.rb
CHANGED
@@ -17,7 +17,7 @@ module CommonThread
|
|
17
17
|
# skip_before_filter :ssl_required
|
18
18
|
#
|
19
19
|
def ssl_required
|
20
|
-
if RAILS_ENV == '
|
20
|
+
if !(RAILS_ENV == 'development' or RAILS_ENV == 'test') and !request.ssl?
|
21
21
|
redirect_to "https://" + request.host + request.request_uri
|
22
22
|
return false
|
23
23
|
end
|