rack-secure-upload 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +33 -0
- data/.travis.yml +18 -0
- data/Gemfile +3 -0
- data/LICENSE +20 -0
- data/README.md +58 -0
- data/Rakefile +8 -0
- data/gemfiles/gemfile +3 -0
- data/gemfiles/rack.1.1.x.gemfile +4 -0
- data/gemfiles/rack.1.2.x.gemfile +4 -0
- data/gemfiles/rack.1.3.x.gemfile +4 -0
- data/gemfiles/rack.1.4.x.gemfile +4 -0
- data/lib/rack-secure-upload.rb +1 -0
- data/lib/rack/secure_upload.rb +11 -0
- data/lib/rack/secure_upload/errors.rb +6 -0
- data/lib/rack/secure_upload/middleware.rb +40 -0
- data/lib/rack/secure_upload/scanner.rb +10 -0
- data/lib/rack/secure_upload/scanner/base.rb +30 -0
- data/lib/rack/secure_upload/scanner/fsecure.rb +47 -0
- data/lib/rack/secure_upload/utility.rb +20 -0
- data/lib/rack/secure_upload/version.rb +5 -0
- data/rack-secure-upload.gemspec +26 -0
- data/spec/rack/secure_upload/middleware_spec.rb +33 -0
- data/spec/rack/secure_upload/scanner/base_spec.rb +36 -0
- data/spec/rack/secure_upload/scanner/fsecure_spec.rb +35 -0
- data/spec/rack/secure_upload/utility_spec.rb +40 -0
- data/spec/rack/secure_upload_spec.rb +7 -0
- data/spec/spec_helper.rb +13 -0
- metadata +162 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: cbe05978464d47ac087ea6adeb658393255286a1
|
4
|
+
data.tar.gz: 665a3cf199c8842d9e462817731bdd7eda1bf680
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 586489032e752102f6fecc512fb2c382479ba6ba1866ae7f0eb85a3af91e7d7e240c23ec79d8c8023d3ba412442983574e6f8190dbd77fac382330ae9c85da0f
|
7
|
+
data.tar.gz: 2babc6bedc1898e099e400c80a4b9f5bbe14a594dc458d7c2dcda38a6b38fda2d2aaf5fd1a7592b5ff913086ff724a04674a84bb2dc8d6af751f9d0059883afd
|
data/.gitignore
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
/log/
|
12
|
+
|
13
|
+
## Specific to RubyMotion:
|
14
|
+
.dat*
|
15
|
+
.repl_history
|
16
|
+
build/
|
17
|
+
|
18
|
+
## Documentation cache and generated files:
|
19
|
+
/.yardoc/
|
20
|
+
/_yardoc/
|
21
|
+
/doc/
|
22
|
+
/rdoc/
|
23
|
+
|
24
|
+
## Environment normalisation:
|
25
|
+
/.bundle/
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
## Misc
|
29
|
+
Gemfile.lock
|
30
|
+
gemfiles/*.lock
|
31
|
+
.ruby-version
|
32
|
+
.ruby-gemset
|
33
|
+
.rvmrc
|
data/.travis.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
language: ruby
|
2
|
+
|
3
|
+
rvm:
|
4
|
+
- 1.9.3
|
5
|
+
- 2.0.0
|
6
|
+
- 2.1.0
|
7
|
+
gemfile:
|
8
|
+
- gemfiles/gemfile
|
9
|
+
- gemfiles/rack.1.4.x.gemfile
|
10
|
+
- gemfiles/rack.1.3.x.gemfile
|
11
|
+
- gemfiles/rack.1.2.x.gemfile
|
12
|
+
- gemfiles/rack.1.1.x.gemfile
|
13
|
+
|
14
|
+
script: "bundle exec rake spec"
|
15
|
+
|
16
|
+
branches:
|
17
|
+
only:
|
18
|
+
- master
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Daisuke Taniwaki
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
+
this software and associated documentation files (the "Software"), to deal in
|
7
|
+
the Software without restriction, including without limitation the rights to
|
8
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
+
subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# rack-secure-upload
|
2
|
+
|
3
|
+
Upload files securely
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add the rack-secure-upload gem to your Gemfile.
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem "rack-secure-upload"
|
11
|
+
```
|
12
|
+
|
13
|
+
And run `bundle install`.
|
14
|
+
|
15
|
+
### Rack App
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'rack-secure-upload'
|
19
|
+
use Rack::SecureUpload::Middleware, :fsecure
|
20
|
+
run MyApp
|
21
|
+
```
|
22
|
+
|
23
|
+
### Rails App
|
24
|
+
|
25
|
+
In `config/application.rb`
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
module MyApp
|
29
|
+
class Application < Rails::Application
|
30
|
+
config.middleware.use Rack::DevMark::Middleware, :fsecure
|
31
|
+
end
|
32
|
+
end
|
33
|
+
```
|
34
|
+
|
35
|
+
## AntiVirus Softwares
|
36
|
+
|
37
|
+
### F-Secure
|
38
|
+
|
39
|
+
1. Get [license](http://www.f-secure.com/en/web/business_global/trial)
|
40
|
+
2. Install the package
|
41
|
+
|
42
|
+
```bash
|
43
|
+
wget http://download.f-secure.com/webclub/f-secure-linux-security-10.00.60.tar.gz
|
44
|
+
tar xvzf f-secure-linux-security-10.00.60.tar.gz
|
45
|
+
sudo ./f-secure-linux-security-10.00.60/f-secure-linux-security-10.00.60
|
46
|
+
```
|
47
|
+
|
48
|
+
## Contributing
|
49
|
+
|
50
|
+
1. Fork it
|
51
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
52
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
53
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
54
|
+
5. Create new [Pull Request](../../pull/new/master)
|
55
|
+
|
56
|
+
## Copyright
|
57
|
+
|
58
|
+
Copyright (c) 2014 Daisuke Taniwaki. See [LICENSE](LICENSE) for details.
|
data/Rakefile
ADDED
data/gemfiles/gemfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'rack/secure_upload'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'rack'
|
2
|
+
require 'rack/secure_upload/utility'
|
3
|
+
require 'rack/secure_upload/scanner'
|
4
|
+
|
5
|
+
module Rack
|
6
|
+
module SecureUpload
|
7
|
+
class Middleware
|
8
|
+
include Utility
|
9
|
+
|
10
|
+
def initialize(app, scanners)
|
11
|
+
@app = app
|
12
|
+
@scanners = [scanners].flatten.map { |scanner| scanner.is_a?(Symbol) ? Rack::SecureUpload::Scanner.const_get(camelize(scanner.to_s)).new : scanner }
|
13
|
+
end
|
14
|
+
|
15
|
+
def call(env)
|
16
|
+
params = Rack::Multipart.parse_multipart(env)
|
17
|
+
if params && !params.empty?
|
18
|
+
traverse(params) do |value|
|
19
|
+
next unless [Tempfile, File].any?{ |klass| value.is_a?(klass) }
|
20
|
+
scan value.path
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
@app.call(env)
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def scan(path)
|
30
|
+
secure = @scanners.any? do |scanner|
|
31
|
+
unless res = scanner.scan(path)
|
32
|
+
Rack::SecureUpload.logger.warn "#{scanner} found an insecure file: #{path}"
|
33
|
+
end
|
34
|
+
res
|
35
|
+
end
|
36
|
+
raise InsecureFileError, "The uploaded file \"#{path}\" is insecure!" unless secure
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'rack/secure_upload/errors'
|
2
|
+
|
3
|
+
module Rack
|
4
|
+
module SecureUpload
|
5
|
+
module Scanner
|
6
|
+
class Base
|
7
|
+
attr_reader :options, :logger
|
8
|
+
|
9
|
+
def initialize(options = {})
|
10
|
+
raise RuntimeError, 'Abstract class can not be instantiated' if self.class == Rack::SecureUpload::Scanner::Base
|
11
|
+
@options = default_options.merge(options)
|
12
|
+
end
|
13
|
+
|
14
|
+
def scan(path)
|
15
|
+
# Scan the file here
|
16
|
+
end
|
17
|
+
|
18
|
+
def logger
|
19
|
+
options[:logger] || Rack::SecureUpload.logger
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def default_options
|
25
|
+
{}
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require 'cocaine'
|
2
|
+
require 'rack/secure_upload/errors'
|
3
|
+
|
4
|
+
module Rack
|
5
|
+
module SecureUpload
|
6
|
+
module Scanner
|
7
|
+
class Fsecure < Base
|
8
|
+
def scan(path)
|
9
|
+
now_umask = ::File.umask(0)
|
10
|
+
|
11
|
+
lock do
|
12
|
+
output = command.run(path: path)
|
13
|
+
logger.info output
|
14
|
+
end
|
15
|
+
|
16
|
+
::File.exist?(path)
|
17
|
+
ensure
|
18
|
+
::File.umask(now_umask)
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def lock
|
24
|
+
::File.open(options[:lockfile_path], 'w', 0666) do |f|
|
25
|
+
f.flock(::File::LOCK_EX)
|
26
|
+
begin
|
27
|
+
yield
|
28
|
+
ensure
|
29
|
+
f.flock(::File::LOCK_UN)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def command
|
35
|
+
Cocaine::CommandLine.new(options[:bin_path], "--auto --virus-action1=remove :path")
|
36
|
+
end
|
37
|
+
|
38
|
+
def default_options
|
39
|
+
{
|
40
|
+
:bin_path => "/usr/bin/fsav",
|
41
|
+
:lockfile_path => "/tmp/fsav_lock"
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Rack
|
2
|
+
module SecureUpload
|
3
|
+
module Utility
|
4
|
+
def traverse(value, &block)
|
5
|
+
if value.is_a?(Hash)
|
6
|
+
value.each do |k, v|
|
7
|
+
traverse(k, &block)
|
8
|
+
traverse(v, &block)
|
9
|
+
end
|
10
|
+
elsif value.is_a?(Array)
|
11
|
+
value.each do |v|
|
12
|
+
traverse(v, &block)
|
13
|
+
end
|
14
|
+
else
|
15
|
+
block.call(value)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require File.expand_path('../lib/rack/secure_upload/version', __FILE__)
|
2
|
+
|
3
|
+
Gem::Specification.new do |gem|
|
4
|
+
gem.name = "rack-secure-upload"
|
5
|
+
gem.version = Rack::SecureUpload::VERSION
|
6
|
+
gem.platform = Gem::Platform::RUBY
|
7
|
+
gem.authors = ["Daisuke Taniwaki"]
|
8
|
+
gem.email = ["daisuketaniwaki@gmail.com"]
|
9
|
+
gem.homepage = "https://github.com/dtaniwaki/rack-secure-upload"
|
10
|
+
gem.summary = "Upload files securely"
|
11
|
+
gem.description = "Upload files securely"
|
12
|
+
gem.license = "MIT"
|
13
|
+
|
14
|
+
gem.files = `git ls-files`.split("\n")
|
15
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
gem.require_paths = ['lib']
|
18
|
+
|
19
|
+
gem.add_dependency 'logger', '>= 1.2'
|
20
|
+
gem.add_dependency "rack", ">= 1.1"
|
21
|
+
gem.add_dependency "cocaine"
|
22
|
+
|
23
|
+
gem.add_development_dependency "rake"
|
24
|
+
gem.add_development_dependency "rspec", ">= 3.0"
|
25
|
+
gem.add_development_dependency "coveralls"
|
26
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Rack::SecureUpload::Middleware do
|
4
|
+
let(:env) { Rack::MockRequest.env_for('/') }
|
5
|
+
let(:file) { Rack::Multipart::UploadedFile.new(__FILE__) }
|
6
|
+
let(:scanner) { double scan: true }
|
7
|
+
subject { Rack::SecureUpload::Middleware.new(->env { ":)" }, scanner) }
|
8
|
+
|
9
|
+
context "with uploaded file" do
|
10
|
+
let(:env) { Rack::MockRequest.env_for('/', method: :post, params: {foo: file}) }
|
11
|
+
|
12
|
+
it "scans" do
|
13
|
+
expect(scanner).to receive(:scan)
|
14
|
+
subject.call(env)
|
15
|
+
end
|
16
|
+
|
17
|
+
context "with multiple uploaded files" do
|
18
|
+
let(:env) { Rack::MockRequest.env_for('/', method: :post, params: {foo: file, bar: file, zoo: file}) }
|
19
|
+
|
20
|
+
it "scans" do
|
21
|
+
expect(scanner).to receive(:scan).exactly(3).times
|
22
|
+
subject.call(env)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
context "without uplaod file" do
|
28
|
+
it "does not scan" do
|
29
|
+
expect(scanner).not_to receive(:scan)
|
30
|
+
subject.call(env)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Rack::SecureUpload::Scanner::Base do
|
4
|
+
let(:klass) { Rack::SecureUpload::Scanner::Base }
|
5
|
+
it "has private initialize method" do
|
6
|
+
expect {
|
7
|
+
klass.new
|
8
|
+
}.to raise_error(Rack::SecureUpload::RuntimeError)
|
9
|
+
end
|
10
|
+
describe "subclass" do
|
11
|
+
describe "options" do
|
12
|
+
it "merges default options with argument options" do
|
13
|
+
scanner = Class.new(klass) {
|
14
|
+
def default_options
|
15
|
+
{color: :green}
|
16
|
+
end
|
17
|
+
}.new(foo: :bar)
|
18
|
+
expect(scanner.options).to eq(foo: :bar, color: :green)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
describe "with logger option" do
|
22
|
+
let(:logger) { double }
|
23
|
+
it "uses its own logger if available" do
|
24
|
+
scanner = Class.new(klass).new(logger: logger)
|
25
|
+
expect(scanner.logger).to eq(logger)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe "without logger option" do
|
29
|
+
let(:logger) { double }
|
30
|
+
it "uses its own logger if available" do
|
31
|
+
scanner = Class.new(klass).new
|
32
|
+
expect(scanner.logger).not_to eq(logger)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Rack::SecureUpload::Scanner::Fsecure do
|
4
|
+
let(:path) { 'tmp/fsecure_spec_target' }
|
5
|
+
subject { Rack::SecureUpload::Scanner::Fsecure.new }
|
6
|
+
|
7
|
+
before do
|
8
|
+
::File.open(path, 'w').close
|
9
|
+
end
|
10
|
+
after do
|
11
|
+
::FileUtils.rm path if ::File.exists?(path)
|
12
|
+
end
|
13
|
+
|
14
|
+
context "normal files" do
|
15
|
+
let(:command) { double run: lambda {} }
|
16
|
+
it "detects an insecure file" do
|
17
|
+
allow(subject).to receive(:command).and_return(command)
|
18
|
+
expect(subject.scan(path)).to eq(true)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context "insecure files" do
|
23
|
+
let(:command) do
|
24
|
+
d = double
|
25
|
+
allow(d).to receive(:run) do
|
26
|
+
::FileUtils.rm path
|
27
|
+
end
|
28
|
+
d
|
29
|
+
end
|
30
|
+
it "does not detect normal file" do
|
31
|
+
allow(subject).to receive(:command).and_return(command)
|
32
|
+
expect(subject.scan(path)).to eq(false)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Rack::SecureUpload::Utility do
|
4
|
+
subject { Class.new{ include Rack::SecureUpload::Utility }.new }
|
5
|
+
|
6
|
+
describe "#traverse" do
|
7
|
+
context "array" do
|
8
|
+
it "yields the block" do
|
9
|
+
targets = [1, 2, 3]
|
10
|
+
traversed = []
|
11
|
+
subject.traverse(targets) do |v|
|
12
|
+
traversed << v
|
13
|
+
end
|
14
|
+
expect(traversed).to eq(targets)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
context "hash" do
|
19
|
+
it "yields the block" do
|
20
|
+
targets = {:a => 1, :b => 2, :c => 3}
|
21
|
+
traversed = Set.new
|
22
|
+
subject.traverse(targets) do |v|
|
23
|
+
traversed << v
|
24
|
+
end
|
25
|
+
expect(traversed).to eq(Set.new(targets.keys + targets.values))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
context "complicated hash" do
|
30
|
+
it "yields the block" do
|
31
|
+
targets = {:a => [1, 2, 3], :b => {'x' => [0], 'y' => 'Y'}, :c => 3}
|
32
|
+
traversed = Set.new
|
33
|
+
subject.traverse(targets) do |v|
|
34
|
+
traversed << v
|
35
|
+
end
|
36
|
+
expect(traversed).to eq(Set.new([:a, 1, 2, 3, :b, 'x', 0, 'y', 'Y', :c, 3]))
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'coveralls'
|
3
|
+
Coveralls.wear!
|
4
|
+
|
5
|
+
require 'rack'
|
6
|
+
require 'rack-secure-upload'
|
7
|
+
|
8
|
+
Dir[File.join(File.dirname(__FILE__), "support/**/*.rb")].each {|f| require f }
|
9
|
+
|
10
|
+
ENV['RACK_ENV'] = 'test'
|
11
|
+
RSpec.configure do |config|
|
12
|
+
end
|
13
|
+
|
metadata
ADDED
@@ -0,0 +1,162 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rack-secure-upload
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daisuke Taniwaki
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-06-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: logger
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.2'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: cocaine
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coveralls
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Upload files securely
|
98
|
+
email:
|
99
|
+
- daisuketaniwaki@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
106
|
+
- Gemfile
|
107
|
+
- LICENSE
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- gemfiles/gemfile
|
111
|
+
- gemfiles/rack.1.1.x.gemfile
|
112
|
+
- gemfiles/rack.1.2.x.gemfile
|
113
|
+
- gemfiles/rack.1.3.x.gemfile
|
114
|
+
- gemfiles/rack.1.4.x.gemfile
|
115
|
+
- lib/rack-secure-upload.rb
|
116
|
+
- lib/rack/secure_upload.rb
|
117
|
+
- lib/rack/secure_upload/errors.rb
|
118
|
+
- lib/rack/secure_upload/middleware.rb
|
119
|
+
- lib/rack/secure_upload/scanner.rb
|
120
|
+
- lib/rack/secure_upload/scanner/base.rb
|
121
|
+
- lib/rack/secure_upload/scanner/fsecure.rb
|
122
|
+
- lib/rack/secure_upload/utility.rb
|
123
|
+
- lib/rack/secure_upload/version.rb
|
124
|
+
- rack-secure-upload.gemspec
|
125
|
+
- spec/rack/secure_upload/middleware_spec.rb
|
126
|
+
- spec/rack/secure_upload/scanner/base_spec.rb
|
127
|
+
- spec/rack/secure_upload/scanner/fsecure_spec.rb
|
128
|
+
- spec/rack/secure_upload/utility_spec.rb
|
129
|
+
- spec/rack/secure_upload_spec.rb
|
130
|
+
- spec/spec_helper.rb
|
131
|
+
homepage: https://github.com/dtaniwaki/rack-secure-upload
|
132
|
+
licenses:
|
133
|
+
- MIT
|
134
|
+
metadata: {}
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ">="
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubyforge_project:
|
151
|
+
rubygems_version: 2.2.2
|
152
|
+
signing_key:
|
153
|
+
specification_version: 4
|
154
|
+
summary: Upload files securely
|
155
|
+
test_files:
|
156
|
+
- spec/rack/secure_upload/middleware_spec.rb
|
157
|
+
- spec/rack/secure_upload/scanner/base_spec.rb
|
158
|
+
- spec/rack/secure_upload/scanner/fsecure_spec.rb
|
159
|
+
- spec/rack/secure_upload/utility_spec.rb
|
160
|
+
- spec/rack/secure_upload_spec.rb
|
161
|
+
- spec/spec_helper.rb
|
162
|
+
has_rdoc:
|