Skip to content

Commit

Permalink
Brakemanによるセキュリティ警告の対処
Browse files Browse the repository at this point in the history
  • Loading branch information
toshi3221 committed Mar 13, 2018
1 parent c35f3bc commit ff13f9a
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -16,3 +16,6 @@
*.swp
/nbproject
/public/assets/*

# Old(Rails < 4.1) Secret Token
config/initializers/secret_token.rb
5 changes: 5 additions & 0 deletions Gemfile
Expand Up @@ -41,6 +41,11 @@ group :development, :test do
gem 'cucumber'
gem 'cucumber-rails', :require => false
end

group :development do
gem 'brakeman'
end

gem 'pusher'

gem 'therubyracer'
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -42,6 +42,7 @@ GEM
public_suffix (>= 2.0.2, < 4.0)
arel (8.0.0)
backports (3.11.1)
brakeman (4.2.0)
builder (3.2.3)
capybara (2.18.0)
addressable
Expand Down Expand Up @@ -247,6 +248,7 @@ PLATFORMS
ruby

DEPENDENCIES
brakeman
capybara
coffee-rails
cucumber
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
@@ -1,5 +1,5 @@
class ApplicationController < ActionController::Base
protect_from_forgery
protect_from_forgery with: :exception
include ERB::Util

def login?
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/authentication_controller.rb
@@ -1,4 +1,4 @@
class AuthenticationController < ActionController::Base
class AuthenticationController < ApplicationController
def index
@callback_url = params[:callback]
render layout: 'top'
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/application.html.erb
Expand Up @@ -40,8 +40,8 @@
</div>
<% end %>

<div id="channel_name_static" style="display:inline;"><%== @channel.name %></div>
<div id="channel_name_edit" style="display:none;"><%== f.text_field :name %></div>
<div id="channel_name_static" style="display:inline;"><%= @channel.name %></div>
<div id="channel_name_edit" style="display:none;"><%= f.text_field :name %></div>
<% end %><% end %>
</div>
<p class="nav pull-right logout">
Expand Down
12 changes: 0 additions & 12 deletions config/initializers/secret_token.rb

This file was deleted.

0 comments on commit ff13f9a

Please sign in to comment.