Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort sql injection vulnerability, add gem brakeman #1214

Closed
wants to merge 182 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
20c81a2
ActiveSupport::Testing::Performance extracted to a gem
cesswairimu May 5, 2019
d4131fd
ruby prof required as a dependency
cesswairimu May 5, 2019
9c21952
Configurations update for rails 4.0
cesswairimu May 5, 2019
c4a3cba
disable rubocop on bin folder
cesswairimu May 5, 2019
58b80a1
http patch
cesswairimu May 5, 2019
76d6e33
Comment out to allow testing
cesswairimu May 5, 2019
3d7d8ba
no longer supports plugin loading
cesswairimu May 5, 2019
8b2eaaf
lock to sprockets 2.12
cesswairimu May 5, 2019
ddb6d7c
Active record patches
cesswairimu May 5, 2019
a79930a
remove deprecated test syntax
cesswairimu May 6, 2019
a1d0aaf
fix failing tests
cesswairimu May 7, 2019
7cb7a4d
change new super class
cesswairimu May 7, 2019
2ef8715
replace right_aws with right_aws_api
cesswairimu May 9, 2019
fc838a8
lock to rails 4.2.11.1
cesswairimu May 14, 2019
b5b6340
change rails version in install script
cesswairimu May 14, 2019
6dc3a69
remove deprecation warnings
cesswairimu May 14, 2019
06f4d00
make app work
cesswairimu May 14, 2019
4db8646
Change test lib to minitest, add minitest reporters
cesswairimu May 11, 2019
6ddb5bc
active record find patches
cesswairimu May 15, 2019
4f31616
root_in_json include defaulted to false
cesswairimu May 16, 2019
76e078a
confirm option removed in link helper
cesswairimu May 16, 2019
5d613e8
cookies serializer changed to hybrid
cesswairimu May 16, 2019
80e12b7
Change render :text to :plain
cesswairimu May 16, 2019
01d86fa
console for dev web
cesswairimu May 16, 2019
db6c5fa
Check and fix interface functionality
cesswairimu May 18, 2019
290273f
fix export functionality
cesswairimu May 21, 2019
36c9208
add protected attributes for the warpable model
cesswairimu May 28, 2019
c53bf27
fix image upload
cesswairimu May 31, 2019
2f23252
Fix comments and images failing tests
cesswairimu Jun 1, 2019
0f76698
include mass assignment security in annotations
cesswairimu Jun 4, 2019
de27727
render html for update images
cesswairimu Jun 4, 2019
685143c
clear mail array before every test
cesswairimu Jun 4, 2019
74a9ecb
Fix codeclimate issues
cesswairimu Jun 5, 2019
daac614
skip failing test
cesswairimu Jun 7, 2019
528ec09
replace unprotected redirects
cesswairimu Jun 7, 2019
1d220ec
Fix codeclimate issues
cesswairimu Jun 5, 2019
5bb19c2
Autofixing rubocop offenses and Problematic test for #578 (#667)
alaxalves Jun 6, 2019
11dd71f
change post test to create since action new is a get action
cesswairimu Jun 7, 2019
fbb29ba
remove unprotected redirects
cesswairimu Jun 7, 2019
bba8fad
Fix codeclimate issues
cesswairimu Jun 7, 2019
6bc9a8c
Add yarn
kaustubh-nair Jun 10, 2019
116f385
Remove error log
kaustubh-nair Jun 10, 2019
75c2fef
Fix oauth icons
kaustubh-nair Jun 10, 2019
1f1dedd
Modify package.json
kaustubh-nair Jun 10, 2019
f7f526f
Add yarn install to start.sh
kaustubh-nair Jun 10, 2019
68385c3
Add leaflet google
kaustubh-nair Jun 10, 2019
ae88815
Remove leaflet-google from package json
kaustubh-nair Jun 10, 2019
49af138
remove passenger error logs
kaustubh-nair Jun 10, 2019
b34dd84
Fix install script
kaustubh-nair Jun 10, 2019
5c0c7c7
Remove flag
kaustubh-nair Jun 11, 2019
22e5312
Fix gemfile.lock
kaustubh-nair Jun 11, 2019
5da06ce
Fix gemfile.lock
kaustubh-nair Jun 11, 2019
2ecc4be
Merge branch 'yarn-bower' into development
kaustubh-nair Jun 11, 2019
d71d9ad
Fix login
kaustubh-nair Jun 11, 2019
1d1211f
Upgrade Gemfile to Rails 5.0
kaustubh-nair Jun 12, 2019
13cdef5
require rake'
kaustubh-nair Jun 12, 2019
c20a903
Change config files
kaustubh-nair Jun 12, 2019
5a28772
Add application record
kaustubh-nair Jun 12, 2019
df7b02f
Bump mysql
kaustubh-nair Jun 12, 2019
1c1e2c2
Local builds for Travis runners (#672)
alaxalves Jun 13, 2019
3385812
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jun 13, 2019
4cd47a4
Test yarn for travis
kaustubh-nair Jun 13, 2019
f0297dd
Conditionalize rake db:setup for travis
kaustubh-nair Jun 13, 2019
40ad993
Add semicolon
kaustubh-nair Jun 13, 2019
91d082f
Remove comment
kaustubh-nair Jun 13, 2019
0607a4f
modify database.yml
kaustubh-nair Jun 13, 2019
a3e7ff8
Migrate seperately
kaustubh-nair Jun 13, 2019
525eb1a
Run create only for production
kaustubh-nair Jun 13, 2019
4fb5be3
Locking newer Rails v
alaxalves Jun 13, 2019
d058ce3
Running update task
alaxalves Jun 13, 2019
d90db0e
Adding missing bootsnap gem
alaxalves Jun 13, 2019
6e28143
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jun 13, 2019
6545537
Fixing missing database
alaxalves Jun 13, 2019
24bd1f7
Adding missing listen gem
alaxalves Jun 13, 2019
e60bb83
Fixing schema example version
alaxalves Jun 13, 2019
6bedcc1
Fixing migration versions
alaxalves Jun 13, 2019
642beb4
Fix conflicts
kaustubh-nair Jun 16, 2019
2c746c1
Updating dependencies for Rails 5
alaxalves Jun 19, 2019
88b3c8a
Adding ApplicationMailer abstraction
alaxalves Jun 19, 2019
17f8e88
Adding required initializers
alaxalves Jun 19, 2019
463fd8d
Prefer require_relative instead of full path
alaxalves Jun 19, 2019
154f8b5
Making associations not required by default
alaxalves Jun 19, 2019
c9e8b1b
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jun 19, 2019
bccec1b
Regenerating schema file
alaxalves Jun 19, 2019
f678d95
Hotfixing MassAssigment
alaxalves Jun 19, 2019
f39d468
Upgrade web-console, remove mysql adapter override
kaustubh-nair Jun 20, 2019
c1837f1
Remove attr_accessible
kaustubh-nair Jun 20, 2019
cfca3ce
Add rails-controller-testing gem
kaustubh-nair Jun 20, 2019
47ce35a
Follow new syntax for tests
kaustubh-nair Jun 20, 2019
10cec89
Fix conflicts
kaustubh-nair Jun 20, 2019
ca9a118
Remove extra web-console from gemfile
kaustubh-nair Jun 20, 2019
d86282c
Regenerating lock file
alaxalves Jun 21, 2019
616f1fe
Fixing rubocop offenses and bundler version
alaxalves Jun 21, 2019
2495a8a
Using correct Paperclip class as in https://github.com/rails/rails/is…
alaxalves Jun 21, 2019
b2fdaea
Fix images functional tests
kaustubh-nair Jun 25, 2019
03bcfd3
images controller test typecast to string
kaustubh-nair Jun 25, 2019
672fabd
Fix rails logger
kaustubh-nair Jun 25, 2019
a146edb
Fix map tests
kaustubh-nair Jun 25, 2019
3a10c73
Bumping rubocop version
alaxalves Jun 27, 2019
e2e17e5
Autofixing rubocop offenses
alaxalves Jun 27, 2019
1340e4d
Including performance cop to rubocop
alaxalves Jun 27, 2019
37efb69
Refactoring deprecated routing and secret_token
alaxalves Jun 27, 2019
d81e8e0
Fixing routes for feed controller
alaxalves Jun 27, 2019
87bb313
Using correct routes for RSS builder
alaxalves Jun 27, 2019
a5726c7
Fixing missing routes
alaxalves Jun 28, 2019
b0b1dc0
Fixing travis bundler and yarn cache
alaxalves Jun 28, 2019
6cfd543
Fixing bundle path
alaxalves Jun 28, 2019
4fa14f2
Splitting bundle and yarn verifications
alaxalves Jun 29, 2019
b40bebd
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 2, 2019
d5ed24a
Autofixing rubocop offenses
alaxalves Jul 2, 2019
5db0ac9
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jul 2, 2019
6cf32f7
Fixing prod host for travis, private class usage and rubocop offenses
alaxalves Jul 3, 2019
8512b65
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jul 3, 2019
18436ae
Upgrade to Rails 5.2 (#685)
kaustubh-nair Jul 3, 2019
3f12c76
Merge branch 'rails-5' of https://github.com/publiclab/mapknitter int…
alaxalves Jul 3, 2019
e67ed3b
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 3, 2019
297bcb0
Enforcing params usage on get method
alaxalves Jul 3, 2019
e3f3c9d
Using correct folder names to Rails >5 conventions
alaxalves Jul 3, 2019
3291e16
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 6, 2019
553d8ea
Enforcing params wrapping and adding missing front_ui route
alaxalves Jul 6, 2019
85f54a5
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 10, 2019
3b1f578
Precompiling assets before serving
alaxalves Jul 11, 2019
b57356d
Improving Jenkins startup script
alaxalves Jul 12, 2019
63b0a89
Using supported docker yaml version by Jenkins
alaxalves Jul 15, 2019
5678f71
Adding task to check database existance
alaxalves Jul 15, 2019
43d86e1
Improving start script
alaxalves Jul 15, 2019
658d4ea
Improving Makefile's recipes and target
alaxalves Jul 15, 2019
0c685d1
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 15, 2019
1c61d3a
Adding task to check database existance
alaxalves Jul 15, 2019
381704c
Improving start script
alaxalves Jul 15, 2019
85bb1eb
Improving Makefile's recipes and target
alaxalves Jul 15, 2019
431164d
Improving Makefile's recipes and target
alaxalves Jul 15, 2019
63c6a59
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jul 15, 2019
2abced6
Merge branch 'fix-missing-steps-jenkins' of https://github.com/public…
alaxalves Jul 15, 2019
8d85686
Patching https://github.com/publiclab/mapknitter/pull/803
alaxalves Jul 16, 2019
d91554e
Improving Jenkins setup
alaxalves Jul 16, 2019
f4005d0
Fix map loading
kaustubh-nair Jul 20, 2019
9d7267d
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 22, 2019
58bc692
h
sashadev-sky Jul 25, 2019
f8d2b8d
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 26, 2019
bf66f69
Fixing Leaflet-Environmental-Layers map loading
alaxalves Jul 26, 2019
997a6fa
h
sashadev-sky Jul 25, 2019
ab615b5
leaflet
sashadev-sky Jul 26, 2019
3dd385a
fix
sashadev-sky Jul 26, 2019
c785c63
change
sashadev-sky Jul 26, 2019
cc22333
updates
sashadev-sky Jul 26, 2019
81d496f
stop precompiling assets
sashadev-sky Jul 26, 2019
4cb16b0
precompile
sashadev-sky Jul 26, 2019
1fbba3a
Merge branch 'lfix' of https://github.com/sashadev-sky/mapknitter int…
alaxalves Jul 26, 2019
ccafe26
Using correct Yarn, NPM and Node version, avoiding mismatch
alaxalves Jul 26, 2019
b80b315
Removing unwanted tags.js invocation
alaxalves Jul 29, 2019
85f1b3c
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Jul 29, 2019
2d12491
Improving Makefile recipe
alaxalves Jul 30, 2019
906beb3
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jul 30, 2019
552fc70
Using node_modules/ as dependencies folder, since https://github.com/…
alaxalves Jul 30, 2019
2773d0e
Upgrading Yarn dependencies
alaxalves Jul 30, 2019
15369b4
Removing duplicate rubocop directive
alaxalves Jul 30, 2019
41a0c3e
Removing test/ from codeclimate checks
alaxalves Jul 30, 2019
4d2c947
Removing fixed FIXME comments
alaxalves Jul 30, 2019
0970e84
Removing fixed FIXME comments
alaxalves Jul 30, 2019
de5774b
Merge branch 'development' of https://github.com/publiclab/mapknitter…
alaxalves Jul 30, 2019
2211dc4
Updating docs in README
alaxalves Jul 30, 2019
ca0c2fc
Bumping recaptcha and include methods
alaxalves Aug 2, 2019
98a6ca7
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Aug 6, 2019
74b75ca
Fixing migration version
alaxalves Aug 6, 2019
0148e7a
Using strong params in requests
alaxalves Aug 6, 2019
df2f8f1
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
kaustubh-nair Aug 10, 2019
6b59103
Use Rack::Test::UploadedFile instead of ActionDispatch::Http::Uploade…
kaustubh-nair Aug 10, 2019
3f09e8d
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
kaustubh-nair Aug 15, 2019
a1fe6ad
Fix minor asset issue
kaustubh-nair Aug 15, 2019
a900b99
Remove manual asset references and add them to application js
kaustubh-nair Aug 15, 2019
0a18f29
Fix asset ordering in application.js
kaustubh-nair Aug 15, 2019
ad142c5
Configure System tests (#936)
kaustubh-nair Aug 15, 2019
cacf26d
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Aug 16, 2019
87e18ee
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Aug 20, 2019
843a719
action cable setup (#805)
ViditChitkara Aug 21, 2019
f78cbc9
Fixing CodeClimate issues
alaxalves Aug 21, 2019
1627b96
Synch editing add ons (#957)
ViditChitkara Aug 23, 2019
cacf446
Merge branch 'main' of https://github.com/publiclab/mapknitter into d…
alaxalves Oct 3, 2019
8c1d634
sort sql injection vulnerability, add gem brkeman to helo detect more…
StlMaris123 Jan 21, 2020
3f8325e
update reviews requested
StlMaris123 Feb 3, 2020
c12066a
update to master
StlMaris123 Feb 3, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ group :development, :test do
gem 'faker', '~> 2.6.0'
gem 'pry-rails', '~> 0.3.9'
gem 'action-cable-testing'
gem 'brakeman'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great @StlMaris123
But I think brakeman is used only to detect vulnerabilities right?
So it should be better to add this to the development group if it isn't being used in production.

end

group :development do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ GEM
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
brakeman (4.7.2)
builder (3.2.3)
byebug (11.0.1)
capybara (3.29.0)
Expand Down Expand Up @@ -351,6 +352,7 @@ DEPENDENCIES
aws-sdk-s3 (~> 1)
bootsnap (~> 1.4.5)
bootstrap-sass
brakeman
byebug (~> 11.0.1)
capybara
codecov
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def index
@users = User.joins(:maps)
.select('users.*, count(users.id) as maps_count')
.group('maps.user_id')
.order(sort_column + ' ' + sort_direction)
.order(sort_column => sort_direction)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, could we do sort_column: sort_direction here?

Then, let's rebase and this looks great! Thank you @StlMaris123 !!!

.paginate(page: params[:page], per_page: 24)
render 'users/index'
end
Expand Down