Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
社会瑞弟呀
brakeman
提交
6e9554cf
B
brakeman
项目概览
社会瑞弟呀
/
brakeman
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
brakeman
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6e9554cf
编写于
5月 06, 2013
作者:
J
Justin Collins
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'skip_unknown_configs_rails_3'
上级
aa1ec3e7
b1f97abb
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
17 addition
and
0 deletion
+17
-0
lib/brakeman/processors/lib/rails3_config_processor.rb
lib/brakeman/processors/lib/rails3_config_processor.rb
+8
-0
test/apps/rails3.2/config/application.rb
test/apps/rails3.2/config/application.rb
+4
-0
test/apps/rails3.2/config/environments/production.rb
test/apps/rails3.2/config/environments/production.rb
+5
-0
未找到文件。
lib/brakeman/processors/lib/rails3_config_processor.rb
浏览文件 @
6e9554cf
...
...
@@ -72,6 +72,14 @@ class Brakeman::Rails3ConfigProcessor < Brakeman::BaseProcessor
level
=
@tracker
.
config
[
:rails
]
options
[
0
..-
2
].
each
do
|
o
|
level
[
o
]
||=
{}
option
=
level
[
o
]
if
not
option
.
is_a?
Hash
Brakeman
.
debug
"[Notice] Skipping config setting:
#{
options
.
map
(
&
:to_s
).
join
(
"."
)
}
"
return
exp
end
level
=
level
[
o
]
end
...
...
test/apps/rails3.2/config/application.rb
浏览文件 @
6e9554cf
...
...
@@ -58,5 +58,9 @@ module Rails32
# Version of your assets, change this if you want to expire all your assets
config
.
assets
.
version
=
'1.0'
config
.
mess_things_up_in_prod
=
ActiveSupport
::
OrderedOptions
.
new
config
.
actually_a_hash
=
{}
end
end
test/apps/rails3.2/config/environments/production.rb
浏览文件 @
6e9554cf
...
...
@@ -65,4 +65,9 @@ Rails32::Application.configure do
# with SQLite, MySQL, and PostgreSQL)
# config.active_record.auto_explain_threshold_in_seconds = 0.5
config
.
active_record
.
whitelist_attributes
=
true
# These configs actually resolve to values from application.rb
# but that's atypical, so going to skip for now or else errors
config
.
mess_things_up_in_prod
.
right_here
=
:nope_ignored
config
.
actually_a_hash
[
:thing
]
=
'cool setting'
end
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录