lib/openwfe/expool/def_parser.rb
#
# This is the only point in the expression pool where an URI
# is read, so this is where the :remote_definitions_allowed
# security check is enforced.
#
This is the only point in the expression pool where an URI
is read, so this is where the :remote_definitions_allowed
security check is enforced.
This is the only point in the expression pool where an URI is read so this is where the : remote_definitions_allowed security check is enforced .
def read_uri (uri)
      return File.read(uri) if uri.match(/^[A-Z]:\\/)
      u = URI.parse(uri.to_s)
      raise(':remote_definitions_allowed is set to false') \
        if (ac[:remote_definitions_allowed] != true and
          u.scheme and
          u.scheme != 'file')
      f = Rufus::Verbs.fopen(u) 
      result = f.read
      f.close if f.respond_to?(:close)
      result
    end
def read_uri ( uri ) return File . read ( uri ) if uri . match ( / ^[A-Z]: \\ / ) u = URI . parse ( uri . to_s ) raise ( ':remote_definitions_allowed is set to false' ) if ( ac [ :remote_definitions_allowed ] != true and u . scheme and u . scheme != 'file' ) f = Rufus :: Verbs . fopen ( u ) result = f . read f . close if f . respond_to? ( :close ) result end
This is the only point in the expression pool where an URI
is read, so this is where the :remote_definitions_allowed
security check is enforced.
This is the only point in the expression pool where an URI is read so this is where the : remote_definitions_allowed security check is enforced .
# seems like we're on windows, well... A:\ ? # Rufus::Verbs is OK with redirections
uri
<not_specific>