Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
Brakeman
提交
224184f8
B
Brakeman
项目概览
李少辉-开发者
/
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,发现更多精彩内容 >>
提交
224184f8
编写于
2月 13, 2013
作者:
J
Justin Collins
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add tests for JSON vulnerability
上级
d35e660d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
42 addition
and
4 deletion
+42
-4
test/apps/rails3/Gemfile.lock
test/apps/rails3/Gemfile.lock
+1
-0
test/apps/rails3/app/controllers/home_controller.rb
test/apps/rails3/app/controllers/home_controller.rb
+4
-0
test/apps/rails_with_xss_plugin/Gemfile
test/apps/rails_with_xss_plugin/Gemfile
+1
-0
test/tests/test_rails3.rb
test/tests/test_rails3.rb
+9
-1
test/tests/test_rails31.rb
test/tests/test_rails31.rb
+9
-1
test/tests/test_rails32.rb
test/tests/test_rails32.rb
+9
-1
test/tests/test_rails_with_xss_plugin.rb
test/tests/test_rails_with_xss_plugin.rb
+9
-1
未找到文件。
test/apps/rails3/Gemfile.lock
浏览文件 @
224184f8
...
...
@@ -33,6 +33,7 @@ GEM
erubis (2.6.6)
abstract (>= 1.0.0)
i18n (0.6.0)
json_pure (1.6.4)
mail (2.2.19)
activesupport (>= 2.3.6)
i18n (>= 0.4.0)
...
...
test/apps/rails3/app/controllers/home_controller.rb
浏览文件 @
224184f8
...
...
@@ -133,6 +133,10 @@ class HomeController < ApplicationController
YAML
.
parse_stream
User
.
find
(
1
).
upload
end
def
parse_json
JSON
.
parse
params
[
:input
]
end
private
def
filter_it
...
...
test/apps/rails_with_xss_plugin/Gemfile
浏览文件 @
224184f8
source
'http://rubygems.org'
gem
'rails'
,
'2.3.14'
gem
'json'
,
'1.1.0'
gem
'sqlite3'
test/tests/test_rails3.rb
浏览文件 @
224184f8
...
...
@@ -15,7 +15,7 @@ class Rails3Tests < Test::Unit::TestCase
:controller
=>
1
,
:model
=>
8
,
:template
=>
32
,
:warning
=>
5
2
:warning
=>
5
3
}
end
...
...
@@ -854,6 +854,14 @@ class Rails3Tests < Test::Unit::TestCase
:file
=>
/Gemfile/
end
def
test_denial_of_service_CVE_2013_0269
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Denial of Service"
,
:message
=>
/^json_pure\ gem\ version\ 1\.6\.4\ has\ a\ symbol/
,
:confidence
=>
0
,
:file
=>
/Gemfile/
end
def
test_http_only_session_setting
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Session Setting"
,
...
...
test/tests/test_rails31.rb
浏览文件 @
224184f8
...
...
@@ -15,7 +15,7 @@ class Rails31Tests < Test::Unit::TestCase
:model
=>
3
,
:template
=>
22
,
:controller
=>
1
,
:warning
=>
59
}
:warning
=>
60
}
end
def
test_without_protection
...
...
@@ -728,6 +728,14 @@ class Rails31Tests < Test::Unit::TestCase
:file
=>
/Gemfile/
end
def
test_denial_of_service_CVE_2013_0269
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Denial of Service"
,
:message
=>
/^json\ gem\ version\ 1\.5\.4\ has\ a\ symbol\ crea/
,
:confidence
=>
1
,
:file
=>
/Gemfile/
end
def
test_to_json_with_overwritten_config
assert_warning
:type
=>
:template
,
:warning_type
=>
"Cross Site Scripting"
,
...
...
test/tests/test_rails32.rb
浏览文件 @
224184f8
...
...
@@ -11,7 +11,7 @@ class Rails32Tests < Test::Unit::TestCase
:controller
=>
0
,
:model
=>
0
,
:template
=>
6
,
:warning
=>
5
}
:warning
=>
6
}
end
def
report
...
...
@@ -46,6 +46,14 @@ class Rails32Tests < Test::Unit::TestCase
:file
=>
/Gemfile/
end
def
test_remote_code_execution_CVE_2013_0269
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
:message
=>
/^json\ gem\ version\ 1\.7\.5\ has\ a\ remote\ code/
,
:confidence
=>
0
,
:file
=>
/Gemfile/
end
def
test_redirect_1
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Redirect"
,
...
...
test/tests/test_rails_with_xss_plugin.rb
浏览文件 @
224184f8
...
...
@@ -11,7 +11,7 @@ class RailsWithXssPluginTests < Test::Unit::TestCase
:controller
=>
1
,
:model
=>
3
,
:template
=>
2
,
:warning
=>
1
8
}
:warning
=>
1
9
}
end
def
report
...
...
@@ -307,6 +307,14 @@ class RailsWithXssPluginTests < Test::Unit::TestCase
:confidence
=>
0
end
def
test_denial_of_service_CVE_2013_0269
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Denial of Service"
,
:message
=>
/^json\ gem\ version\ 1\.1\.0\ has\ a\ symbol\ crea/
,
:confidence
=>
2
,
:file
=>
/Gemfile/
end
def
test_json_parsing_workaround_CVE_2013_0333
assert_no_warning
:type
=>
:warning
,
:warning_type
=>
"Remote Code Execution"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录