Permalink
Browse files

Merge pull request #69 from luckyruby/master

Includes BCrypt & Fixes NoMethodError - private method `public' called for CASServer::Server:Class:
  • Loading branch information...
2 parents 074798d + 5b5ffd0 commit 094de1651da482ccb0a3b6e872fb205a0d155219 @zuk zuk committed Nov 22, 2011
Showing with 3 additions and 3 deletions.
  1. +1 −0 lib/casserver/authenticators/sql_encrypted.rb
  2. +2 −3 lib/casserver/server.rb
@@ -3,6 +3,7 @@
require 'digest/sha1'
require 'digest/sha2'
require 'crypt-isaac'
+require 'bcrypt'
# This is a more secure version of the SQL authenticator. Passwords are encrypted
# rather than being stored in plain text.
View
@@ -20,7 +20,7 @@ class Server < Sinatra::Base
include Localization
set :app_file, __FILE__
- set :public, Proc.new { settings.config[:public_dir] || File.join(root, "..", "..", "public") }
+ set :public_folder, Proc.new { settings.config[:public_dir] || File.join(root, "..", "..", "public") }
config = HashWithIndifferentAccess.new(
:maximum_unused_login_ticket_lifetime => 5.minutes,
@@ -38,7 +38,7 @@ def self.uri_path
# Strip the config.uri_path from the request.path_info...
# FIXME: do we really need to override all of Sinatra's #static! to make this happen?
def static!
- return if (public_dir = settings.public).nil?
+ return if (public_dir = settings.public_folder).nil?
public_dir = File.expand_path(public_dir)
path = File.expand_path(public_dir + unescape(request.path_info.gsub(/^#{settings.config[:uri_path]}/,'')))
@@ -749,4 +749,3 @@ def compile_template(engine, data, options, views)
end
end
end
-

0 comments on commit 094de16

Please sign in to comment.