Commit Graph

31 Commits

Author SHA1 Message Date
Al Snow ab22759bbf Rebuilt Gemfile.lock file 2013-11-18 11:13:34 -05:00
Mike McCabe 0075ca7a9c lowering rack version for dos 2013-11-14 12:32:53 -05:00
Mike McCabe 52f1ac3c78 bringing the rails and rack version down for A9 2013-11-13 11:46:42 -05:00
Al Snow 98ccf0bd41 Rebuilt Gemfile.lock file; Changed "@@" (class var) to "$" (global var) in spec/support/capybara_shared.rb 2013-10-28 19:45:42 -04:00
Al Snow 9d6c567af1 Rebuilt Gemfile.lock file 2013-10-27 21:49:17 -04:00
Al Snow 203a7a244f Added simplecov gem code changes 2013-10-23 10:29:20 -04:00
Al Snow 10373b3294 Undid stuff for cov and 2.0.0; 1 failed spec 2013-10-23 10:01:14 -04:00
Al Snow ad0cf1d204 After forced git pull to sync with parent repo 2013-10-23 09:36:06 -04:00
Al Snow bd066068ff Upgraded Rails from 3.2.13 to 3.2.15. Removed unneeded "~>" gem numbers in Gemfile. 2013-10-22 10:29:57 -04:00
Al Snow f8ab8c320c Upgraded Ruby to 2.0.0. 2013-10-20 11:59:23 -04:00
Al Snow 45cac913ff Upgraded Rails from 3.2.13 to 3.2.15. Removed unneeded "~>" gem numbers in Gemfile. 2013-10-20 10:42:30 -04:00
Mike McCabe 5177e60669 adding better errors gem 2013-10-11 16:03:36 -04:00
Mike McCabe a93159c9f2 adding launchy 2013-10-09 11:07:13 -04:00
Mike McCabe 19ee423d8d pinning dbcleaner to lower version due to https://github.com/bmabey/database_cleaner/issues/224 2013-10-07 15:23:37 -04:00
chrismo df9efa915b Capybara added to demonstrate vulnerabilities.
Adding Capybara to verify replay-ability of hacking vulnerabilities. I
imagine these may want to be kept on a different branch for QA and
educational purposes, but not distributed with master when forked.

This commit also includes demonstrating the SQL Injection vulnerability.
2013-09-27 10:35:59 -05:00
Ken Johnson fec458f1a7 Merge pull request #45 from chrismo/users_controller_change
Fixed logic to strip out user params.
2013-09-27 07:34:24 -07:00
Chris Morris 20420be1a6 Fixed logic to strip out user params.
Disclaimer: changes like these in this sort of app are tricky because
it's harder to presume the intention of the code in question.

The prior line:

```
user.update_attributes(params[:user].reject { |k| k == ("password" || "password_confirmation") || "user_id" })
```

returns an empty hash, because of the way the block evaluates:

```
irb(main):002:0> k = 'foo'
=> "foo"
irb(main):003:0> k == ("password" || "password_confirmation") || "user_id"
=> "user_id"
```

Before the last change to that line, without 'user_id' outside the
params, it didn't evaluate properly either:

```
irb(main):007:0> k = 'password_confirmation'
=> "password_confirmation"
irb(main):008:0> k == ("password" || "password_confirmation")
=> false
irb(main):009:0> ("password" || "password_confirmation")
=> "password"
```

So, in the normal use case for this form, you can't update any other
attribute of the User. To me, that's probably the best argument for
making this change, but it does simplify the SQL Injection attack
(although perhaps the prior complication was intended).

Before this change, injecting conditional SQL into the user_id param in
the account_settings update call would allow the password of whatever
account is found (e.g. the first one if injecting 'OR 1=1') to be reset,
but without additional attacks, the email address of that account is not
known.

After this change, the email address of that account now is also updated
in addition to the password, making it simpler to get in as an admin --
though you're still presuming the first account to be an admin.
2013-09-25 16:56:34 -05:00
Michael McCabe 9638d8137b travis fix 2013-09-10 10:02:11 -04:00
Michael McCabe 987b6d8844 setting up travis ci env 2013-09-10 09:17:40 -04:00
Michael McCabe 292e8d9845 adding execjs and therubyracer to fix js issue on ubuntu 2013-09-09 21:45:00 -04:00
Michael McCabe 914e35e0dd adding rspec-rails and guard-rspec 2013-09-06 15:43:59 -04:00
Michael McCabe 0bb5fd06c1 fixing Gemfile 2013-09-06 10:08:53 -04:00
Michael McCabe 1f3620a3de adding rspec and auto test runs 2013-09-05 16:52:17 -04:00
cktricky 2a4a7a5440 that was painful but managed to install gauntlt. Turns out you need to revert to minitest 4 (not 5, for the love of humantiy, not 5). Also, added rspec (not sure that did anything). Lastly, aruba and gauntlt. So, we now have a dir explicitly for attack files. 2013-08-08 14:04:52 -04:00
Ken Johnson ea2014b637 I have exhausted all thoughts on how to actually get jquery file upload to work, so screw it, I am just going to make something homegrown for tomorrow 2013-07-09 13:53:00 -04:00
Ken Johnson 2ceb0328c3 added gem 2013-05-24 13:34:28 -04:00
Ken Johnson 5a992c3c1f made some changes to the application controller, added a user controller, and am now about to start working on the login piece 2013-04-24 18:09:43 -04:00
Ken Johnson fb59deb224 more progress 2013-04-24 16:12:16 -04:00
Ken Johnson f95fd522ca added guard stuff 2013-04-11 12:54:11 -04:00
Ken Johnson 642f5dc856 changed Gemfile, added foreman and unicorn 2013-03-19 17:33:03 -04:00
Ken Johnson dafe2a5f4a first commit 2013-03-19 17:27:18 -04:00