Skip to content

Commit

Permalink
Clarify whitelist of classes
Browse files Browse the repository at this point in the history
  • Loading branch information
sj26 committed Feb 1, 2013
1 parent 8edff95 commit acd74ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/initializers/forbidden_yaml.rb
Expand Up @@ -12,7 +12,7 @@ class ForbiddenClassException < Exception

module Visitors
class WhitelistedToRuby < ToRuby
WHITELIST = %w(
WHITELISTED_CLASSES = %w(
Gem::Dependency
Gem::Platform
Gem::Requirement
Expand All @@ -24,7 +24,7 @@ class WhitelistedToRuby < ToRuby
private

def resolve_class klassname
raise ForbiddenClassException, "Forbidden class in YAML: #{klassname}" unless WHITELIST.include? klassname
raise ForbiddenClassException, "Forbidden class in YAML: #{klassname}" unless WHITELISTED_CLASSES.include? klassname
super klassname
end
end
Expand Down

0 comments on commit acd74ef

Please sign in to comment.