Exploit databaseDownload repository ZIP
GH-30b2a11a9c420a26f67ff8cc4b1f424f
abhinav-1050/carrierwave
Sources for CVE-2016-3714
12 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files19
abhinav-1050/carrierwaveRevision 39c52d305ba8
- ↑..Parent directory
- cache.rb
- callbacks.rb
- configuration.rb
- content_type_allowlist.rb
- content_type_denylist.rb
- default_url.rb
- dimension.rb
- download.rb
- extension_allowlist.rb
- extension_denylist.rb
- file_size.rb
- mountable.rb
- processing.rb
- proxy.rb
- remove.rb
- serialization.rb
- store.rb
- url.rb
- versions.rb
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
lib/carrierwave/uploader/url.rb
Ruby · 1,057 bytesmodule CarrierWave
module Uploader
module Url
extend ActiveSupport::Concern
include CarrierWave::Uploader::Configuration
include CarrierWave::Utilities::Uri
##
# === Parameters
#
# [Hash] optional, the query params (only AWS)
#
# === Returns
#
# [String] the location where this file is accessible via a url
#
def url(options = {})
if file.respond_to?(:url)
tmp_url = file.method(:url).arity.zero? ? file.url : file.url(options)
return tmp_url if tmp_url.present?
end
if file.respond_to?(:path)
path = encode_path(file.path.sub(File.expand_path(root), ''))
if (host = asset_host)
if host.respond_to? :call
"#{host.call(file)}#{path}"
else
"#{host}#{path}"
end
else
(base_path || "") + path
end
end
end
def to_s
url || ''
end
end # Url
end # Uploader
end # CarrierWave