提交 5379d85c 编写于 作者: J Justin Collins

Add test for weird block issue in output values

上级 f7f47078
......@@ -9,4 +9,11 @@ module UserMixin
def mixin_default
@dangerous_input = params[:bad]
end
def assign_if
@value = if something
this
that
end
end
end
......@@ -152,6 +152,9 @@ class UsersController < ApplicationController
User.update_all({:admin => true}, { :name => params[:name] }, :limit => params[:limit])
end
def test_assign_if
end
private
def simple_helper
......@@ -175,4 +178,6 @@ class UsersController < ApplicationController
end
include UserMixin
before_filter :assign_if, :only => :test_assign_if
end
......@@ -890,7 +890,7 @@ class Rails31Tests < Test::Unit::TestCase
def test_sql_injection_in_pluck
assert_warning :type => :warning,
:warning_type => "SQL Injection",
:line => 174,
:line => 177,
:message => /^Possible\ SQL\ injection/,
:confidence => 0,
:file => /users_controller\.rb/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册