Re-add authentication, switch to production - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
       ---
 (DIR) commit 3f68dcb4855f7bb1ba65d40ec3c615aebc1639d6
 (DIR) parent acb500fd3b153e34fce50504796aab6458f717d8
 (HTM) Author: HD Moore <hd_moore@rapid7.com>
       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(-)
       ---
 (DIR) 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']
 (DIR) diff --git a/web/app/controllers/application_controller.rb b/web/app/controllers/application_controller.rb
       @@ -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="WarVOX Console"'