Revert to 4.1.9 to work around 4.2.0 issues with bytea - warvox - VoIP based wardialing tool, forked from rapid7/warvox.
DIR Log
DIR Files
DIR Refs
DIR README
---
DIR commit c94ee1522490397635b5a4315be3558ecdb3f39c
DIR parent 25640a14a2325d67b5a745151ae2dcc111ca20b0
HTML Author: HD Moore <hd_moore@rapid7.com>
Date: Tue, 3 Feb 2015 00:18:02 -0600
Revert to 4.1.9 to work around 4.2.0 issues with bytea
Diffstat:
M Gemfile | 2 +-
M Gemfile.lock | 98 ++++++++++++-------------------
M app/models/job.rb | 10 +++++++++-
M app/views/jobs/new_analyze.html.erb | 2 +-
M config/environments/production.rb | 2 +-
M config/routes.rb | 4 ++--
6 files changed, 50 insertions(+), 68 deletions(-)
---
DIR diff --git a/Gemfile b/Gemfile
@@ -1,7 +1,7 @@
source 'http://rubygems.org'
gem 'unicorn'
-gem 'rails', '>=4.1.8', '< 5.0.0'
+gem 'rails', '>=4.1.9', '< 4.2.0'
gem 'pg', '>=0.17'
gem 'jquery-rails', '>= 3.1.2'
DIR diff --git a/Gemfile.lock b/Gemfile.lock
@@ -9,48 +9,39 @@ GIT
GEM
remote: http://rubygems.org/
specs:
- actionmailer (4.2.0)
- actionpack (= 4.2.0)
- actionview (= 4.2.0)
- activejob (= 4.2.0)
+ actionmailer (4.1.9)
+ actionpack (= 4.1.9)
+ actionview (= 4.1.9)
mail (~> 2.5, >= 2.5.4)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- actionpack (4.2.0)
- actionview (= 4.2.0)
- activesupport (= 4.2.0)
- rack (~> 1.6.0)
+ actionpack (4.1.9)
+ actionview (= 4.1.9)
+ activesupport (= 4.1.9)
+ rack (~> 1.5.2)
rack-test (~> 0.6.2)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
- actionview (4.2.0)
- activesupport (= 4.2.0)
+ actionview (4.1.9)
+ activesupport (= 4.1.9)
builder (~> 3.1)
erubis (~> 2.7.0)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.1)
- activejob (4.2.0)
- activesupport (= 4.2.0)
- globalid (>= 0.3.0)
- activemodel (4.2.0)
- activesupport (= 4.2.0)
+ activemodel (4.1.9)
+ activesupport (= 4.1.9)
builder (~> 3.1)
- activerecord (4.2.0)
- activemodel (= 4.2.0)
- activesupport (= 4.2.0)
- arel (~> 6.0)
- activesupport (4.2.0)
- i18n (~> 0.7)
+ activerecord (4.1.9)
+ activemodel (= 4.1.9)
+ activesupport (= 4.1.9)
+ arel (~> 5.0.0)
+ activesupport (4.1.9)
+ i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
+ thread_safe (~> 0.1)
tzinfo (~> 1.1)
- arel (6.0.0)
+ arel (5.0.1.20140414130214)
authlogic (3.4.4)
activerecord (>= 3.2)
activesupport (>= 3.2)
request_store (~> 1.0)
scrypt (~> 1.2)
- autoprefixer-rails (5.1.2)
+ autoprefixer-rails (5.1.3)
execjs
json
bootstrap-sass (3.3.3)
@@ -78,8 +69,6 @@ GEM
actionpack (>= 3.2.13)
formtastic-bootstrap (3.1.0)
formtastic (>= 3.0)
- globalid (0.3.0)
- activesupport (>= 4.1.0)
hike (1.2.3)
i18n (0.7.0)
jquery-datatables-rails (3.1.1)
@@ -87,55 +76,40 @@ GEM
jquery-rails
railties (>= 3.1)
sass-rails
- jquery-rails (4.0.3)
- rails-dom-testing (~> 1.0)
- railties (>= 4.2.0)
+ jquery-rails (3.1.2)
+ railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.2)
kgio (2.9.3)
kissfft (0.0.2)
libv8 (3.16.14.7)
- loofah (2.0.1)
- nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
- mini_portile (0.6.2)
minitest (5.5.1)
multi_json (1.10.1)
- nokogiri (1.6.6.2)
- mini_portile (~> 0.6.0)
pg (0.18.1)
protected_attributes (1.0.8)
activemodel (>= 4.0.1, < 5.0)
psych_shield (0.0.4)
- rack (1.6.0)
+ rack (1.5.2)
rack-test (0.6.3)
rack (>= 1.0)
- rails (4.2.0)
- actionmailer (= 4.2.0)
- actionpack (= 4.2.0)
- actionview (= 4.2.0)
- activejob (= 4.2.0)
- activemodel (= 4.2.0)
- activerecord (= 4.2.0)
- activesupport (= 4.2.0)
+ rails (4.1.9)
+ actionmailer (= 4.1.9)
+ actionpack (= 4.1.9)
+ actionview (= 4.1.9)
+ activemodel (= 4.1.9)
+ activerecord (= 4.1.9)
+ activesupport (= 4.1.9)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.2.0)
- sprockets-rails
- rails-deprecated_sanitizer (1.0.3)
- activesupport (>= 4.2.0.alpha)
- rails-dom-testing (1.0.5)
- activesupport (>= 4.2.0.beta, < 5.0)
- nokogiri (~> 1.6.0)
- rails-deprecated_sanitizer (>= 1.0.1)
- rails-html-sanitizer (1.0.1)
- loofah (~> 2.0)
+ railties (= 4.1.9)
+ sprockets-rails (~> 2.0)
rails-settings-cached (0.4.1)
rails (>= 4.0.0)
- railties (4.2.0)
- actionpack (= 4.2.0)
- activesupport (= 4.2.0)
+ railties (4.1.9)
+ actionpack (= 4.1.9)
+ activesupport (= 4.1.9)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
@@ -199,7 +173,7 @@ DEPENDENCIES
pg (>= 0.17)
protected_attributes (~> 1.0.7)
psych_shield
- rails (>= 4.1.8, < 5.0.0)
+ rails (>= 4.1.9, < 4.2.0)
rails-settings-cached (>= 0.4.1)
reportable!
rex (~> 2.0.3)
DIR diff --git a/app/models/job.rb b/app/models/job.rb
@@ -87,7 +87,7 @@ class Job < ActiveRecord::Base
def update_progress(pct)
if pct >= 100
- self.class.where(id: self.id).update_all(:progress => pct, :completed_at => Time.now, :status => 'completed')
+ self.class.where(id: self.id).update_all(:progress => pct, :completed_at => Time.now, :status => 'completed')
else
self.class.where(id: self.id).update_all(:progress => pct)
end
@@ -112,6 +112,14 @@ class Job < ActiveRecord::Base
when 'analysis'
self.status = 'submitted'
+ d = {
+ :scope => self.scope, # job / project/ global
+ :force => !!(self.force), # true / false
+ :target_id => self.target_id.to_i, # job_id or project_id or nil
+ :target_ids => (self.target_ids || []).map{|x| x.to_i }
+ }
+ $stderr.puts d.inspect
+
self.args = Marshal.dump({
:scope => self.scope, # job / project/ global
:force => !!(self.force), # true / false
DIR diff --git a/app/views/jobs/new_analyze.html.erb b/app/views/jobs/new_analyze.html.erb
@@ -1,6 +1,6 @@
<h1 class='title'>Call Analysis</h1>
-<%= semantic_form_for(@job, :url => analyzer_job_path, :html => { :multipart => true, :method => :put }) do |f| %>
+<%= semantic_form_for(@job, :url => analyze_project_job_path, :html => { :multipart => true, :method => :put }) do |f| %>
<% if @project %>
<%= f.input :project_id, :as => :hidden, :input_html => { :value => @project.id } %>
DIR diff --git a/config/environments/production.rb b/config/environments/production.rb
@@ -9,7 +9,7 @@ Web::Application.configure do
config.action_controller.perform_caching = true
# Disable Rails's static asset server (Apache or nginx will already do this)
- config.serve_static_assets = true
+ config.serve_static_files = true
# Compress JavaScripts and CSS
config.assets.compress = false
DIR diff --git a/config/routes.rb b/config/routes.rb
@@ -29,8 +29,8 @@ Web::Application.routes.draw do
get '/projects/:project_id/scans/:id/analyze' => 'jobs#analyze_job', :as => :analyze_job
get '/projects/:project_id/scans/:id/reanalyze' => 'jobs#reanalyze_job', :as => :reanalyze_job
- get '/projects/:project_id/calls/analyze' => 'jobs#analyze_project', :as => :analyze_project_job
- get '/projects/:project_id/calls/identify' => 'jobs#identify_project', :as => :identify_project_job
+ put '/projects/:project_id/calls/analyze' => 'jobs#analyze_project', :as => :analyze_project_job
+ put '/projects/:project_id/calls/identify' => 'jobs#identify_project', :as => :identify_project_job
get '/projects/:project_id/analyze' => 'analyze#index', :as => :analyze