Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CoCo_Code_Op2
brakeman
提交
172468fb
B
brakeman
项目概览
CoCo_Code_Op2
/
brakeman
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
brakeman
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
172468fb
编写于
12月 01, 2013
作者:
J
Justin Collins
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Lowercase "reflection" in unsafe reflection warning
上级
7ebe5266
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
10 deletion
+10
-10
lib/brakeman/checks/check_unsafe_reflection.rb
lib/brakeman/checks/check_unsafe_reflection.rb
+2
-2
test/tests/rails2.rb
test/tests/rails2.rb
+3
-3
test/tests/rails31.rb
test/tests/rails31.rb
+5
-5
未找到文件。
lib/brakeman/checks/check_unsafe_reflection.rb
浏览文件 @
172468fb
...
...
@@ -7,7 +7,7 @@ require 'brakeman/checks/base_check'
class
Brakeman::CheckUnsafeReflection
<
Brakeman
::
BaseCheck
Brakeman
::
Checks
.
add
self
@description
=
"Checks for
Unsafe R
eflection"
@description
=
"Checks for
unsafe r
eflection"
def
run_check
reflection_methods
=
[
:constantize
,
:safe_constantize
,
:const_get
,
:qualified_const_get
]
...
...
@@ -38,7 +38,7 @@ class Brakeman::CheckUnsafeReflection < Brakeman::BaseCheck
end
if
confidence
message
=
"Unsafe
R
eflection method
#{
method
}
called with
#{
friendly_type_of
input
}
"
message
=
"Unsafe
r
eflection method
#{
method
}
called with
#{
friendly_type_of
input
}
"
warn
:result
=>
result
,
:warning_type
=>
"Remote Code Execution"
,
...
...
test/tests/rails2.rb
浏览文件 @
172468fb
...
...
@@ -1105,7 +1105,7 @@ class Rails2Tests < Test::Unit::TestCase
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
89
,
:message
=>
/^Unsafe\
R
eflection\ method\ constantize\ cal/
,
:message
=>
/^Unsafe\
r
eflection\ method\ constantize\ cal/
,
:confidence
=>
0
,
:file
=>
/home_controller\.rb/
,
:relative_path
=>
"app/controllers/home_controller.rb"
...
...
@@ -1115,7 +1115,7 @@ class Rails2Tests < Test::Unit::TestCase
:warning_code
=>
24
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
1
,
:message
=>
/^Unsafe\
R
eflection\ method\ constantize\ cal/
,
:message
=>
/^Unsafe\
r
eflection\ method\ constantize\ cal/
,
:confidence
=>
0
,
:relative_path
=>
"app/views/home/test_send_target.html.erb"
end
...
...
@@ -1124,7 +1124,7 @@ class Rails2Tests < Test::Unit::TestCase
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
160
,
:message
=>
/^Unsafe\
R
eflection\ method\ constantize\ cal/
,
:message
=>
/^Unsafe\
r
eflection\ method\ constantize\ cal/
,
:confidence
=>
0
,
:file
=>
/home_controller\.rb/
,
:relative_path
=>
"app/controllers/home_controller.rb"
...
...
test/tests/rails31.rb
浏览文件 @
172468fb
...
...
@@ -958,7 +958,7 @@ class Rails31Tests < Test::Unit::TestCase
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
9
,
:message
=>
/^Unsafe\
R
eflection\ method\ constantize\ cal/
,
:message
=>
/^Unsafe\
r
eflection\ method\ constantize\ cal/
,
:confidence
=>
0
,
:file
=>
/admin_controller\.rb/
end
...
...
@@ -968,7 +968,7 @@ class Rails31Tests < Test::Unit::TestCase
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
12
,
:message
=>
/^Unsafe\
R
eflection\ method\ safe_constantiz/
,
:message
=>
/^Unsafe\
r
eflection\ method\ safe_constantiz/
,
:confidence
=>
0
,
:file
=>
/admin_controller\.rb/
end
...
...
@@ -977,7 +977,7 @@ class Rails31Tests < Test::Unit::TestCase
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
14
,
:message
=>
/^Unsafe\
R
eflection\ method\ qualified_const/
,
:message
=>
/^Unsafe\
r
eflection\ method\ qualified_const/
,
:confidence
=>
0
,
:file
=>
/admin_controller\.rb/
end
...
...
@@ -987,7 +987,7 @@ class Rails31Tests < Test::Unit::TestCase
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
16
,
:message
=>
/^Unsafe\
R
eflection\ method\ const_get\ calle/
,
:message
=>
/^Unsafe\
r
eflection\ method\ const_get\ calle/
,
:confidence
=>
0
,
:file
=>
/admin_controller\.rb/
end
...
...
@@ -996,7 +996,7 @@ class Rails31Tests < Test::Unit::TestCase
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:line
=>
18
,
:message
=>
/^Unsafe\
R
eflection\ method\ constantize\ cal/
,
:message
=>
/^Unsafe\
r
eflection\ method\ constantize\ cal/
,
:confidence
=>
1
,
:file
=>
/admin_controller\.rb/
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录