chore(rubocop): giganto rubocop commit.

muahahahah
This commit is contained in:
Joseph Mastey
2017-12-05 18:46:21 -06:00
parent 284cd8811c
commit 9902345291
120 changed files with 743 additions and 635 deletions
+10 -9
View File
@@ -1,32 +1,33 @@
require 'spec_helper'
# frozen_string_literal: true
require "spec_helper"
feature 'insecure direct object reference' do
feature "insecure direct object reference" do
before do
UserFixture.reset_all_users
@normal_user = UserFixture.normal_user
end
scenario 'attack one' do
scenario "attack one" do
login(@normal_user)
visit "/users/#{@normal_user.user_id}/benefit_forms"
download_url = first('.widget-body a')[:href]
visit download_url.sub(/name=(.*?)&/, 'name=config/database.yml&')
download_url = first(".widget-body a")[:href]
visit download_url.sub(/name=(.*?)&/, "name=config/database.yml&")
pending if verifying_fixed?
expect(page.status_code).to eq(200)
expect(page.response_headers['Content-Disposition']).to include('database.yml')
expect(page.response_headers['Content-Length']).to eq('710')
expect(page.response_headers["Content-Disposition"]).to include("database.yml")
expect(page.response_headers["Content-Length"]).to eq("710")
end
scenario "attack two\nTutorial: https://github.com/OWASP/railsgoat/wiki/A4-Insecure-Direct-Object-Reference" do
login(@normal_user)
expect(@normal_user.user_id).not_to eq(2)
visit '/users/2/work_info'
visit "/users/2/work_info"
pending if verifying_fixed?
expect(first('td').text).to eq('Joseph Mastey')
expect(first("td").text).to eq("Joseph Mastey")
end
end