Introduction
Introduction Statistics Contact Development Disclaimer Help
Re-add authentication, switch to production - warvox - VoIP based wardialing to…
Log
Files
Refs
README
---
commit 3f68dcb4855f7bb1ba65d40ec3c615aebc1639d6
parent acb500fd3b153e34fce50504796aab6458f717d8
Author: HD Moore <[email protected]>
Date: Wed, 3 Nov 2010 08:32:27 +0000
Re-add authentication, switch to production
Diffstat:
M bin/warvox.rb | 2 +-
M web/app/controllers/application_co… | 8 +++-----
2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/bin/warvox.rb b/bin/warvox.rb
@@ -53,7 +53,7 @@ args = [
'server',
'-p', opts['ServerPort'].to_s,
'-b', opts['ServerHost'],
- '-e', 'development',
+ '-e', 'production',
]
if opts['Background']
diff --git a/web/app/controllers/application_controller.rb b/web/app/controller…
@@ -27,21 +27,19 @@ private
end
def check_auth
- return true if session.data[:user]
+ return true if session[:user]
user,pass = get_creds
return false if not (user and pass)
if(WarVOX::Config.authenticate(user,pass))
- session.data[:user] = user
+ session[:user] = user
return true
end
return false
end
- def get_auth
- return true
-
+ def get_auth
if(not check_auth())
response.headers["Status"] = "Unauthorized"
response.headers["WWW-Authenticate"] = 'Basic realm="W…
You are viewing proxied material from jay.scot. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.