mruby_sandbox 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/mruby_sandbox/server.rb +1 -32
- data/lib/mruby_sandbox/version.rb +1 -1
- data/mruby_sandbox.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3767158169567620269a5c3079a5771b523162c8
|
4
|
+
data.tar.gz: bfcc95cc749bd68fa7e92cbca07045698456f1ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05796ec82ebf6ac30ac65d8d794a0b876031b9fa901a9389087535e277f571432fadf725d48aade64ec89c7121b5400f73dfb3f65670d441789a419f1c5c1af2
|
7
|
+
data.tar.gz: 3e442f3fd1d51f9bd6c77c4bca23f9b990af86d29bacbf5fb34f2937e6af840607de59195f186107a7b55f856efa6bb408f739e48c9b5ba18c548c5af3f3267c
|
data/Gemfile.lock
CHANGED
@@ -2,20 +2,20 @@ PATH
|
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
4
|
mruby_sandbox (0.5.2)
|
5
|
-
pipe_rpc (~> 2.
|
5
|
+
pipe_rpc (~> 2.1.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
diff-lcs (1.2.5)
|
11
11
|
msgpack (1.0.0)
|
12
|
-
pipe_rpc (2.
|
12
|
+
pipe_rpc (2.1.0)
|
13
13
|
msgpack (~> 1.0)
|
14
14
|
rspec (3.5.0)
|
15
15
|
rspec-core (~> 3.5.0)
|
16
16
|
rspec-expectations (~> 3.5.0)
|
17
17
|
rspec-mocks (~> 3.5.0)
|
18
|
-
rspec-core (3.5.
|
18
|
+
rspec-core (3.5.3)
|
19
19
|
rspec-support (~> 3.5.0)
|
20
20
|
rspec-expectations (3.5.0)
|
21
21
|
diff-lcs (>= 1.2.0, < 2.0)
|
data/lib/mruby_sandbox/server.rb
CHANGED
@@ -1,32 +1 @@
|
|
1
|
-
class MrubySandbox::Server <
|
2
|
-
# instance_eval imposes a security vulnerability on the ordinary ruby side of the sandbox: All
|
3
|
-
# server's methods are accessible from the inside. So with instance_eval from the inside the
|
4
|
-
# following is possible: `client.instance_eval '::Kernel.system("rm -rf /")'`
|
5
|
-
undef_method :instance_eval
|
6
|
-
undef_method :instance_exec
|
7
|
-
|
8
|
-
def self.inherited(subclass)
|
9
|
-
subclass.__send__(:define_method, :respond_to?) do |method|
|
10
|
-
subclass.instance_methods.include?(method.to_sym)
|
11
|
-
end
|
12
|
-
|
13
|
-
subclass.__send__(:define_method, :class) do
|
14
|
-
subclass
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.const_missing(name)
|
19
|
-
::Object.const_get(name)
|
20
|
-
end
|
21
|
-
|
22
|
-
def inspect
|
23
|
-
"#<#{self.class}:#{'%#016x' % __id__}>"
|
24
|
-
end
|
25
|
-
alias_method :to_s, :inspect
|
26
|
-
|
27
|
-
private
|
28
|
-
|
29
|
-
def raise(*args)
|
30
|
-
Kernel.raise *args
|
31
|
-
end
|
32
|
-
end
|
1
|
+
class MrubySandbox::Server < PipeRpc::Hub::Server; end
|
data/mruby_sandbox.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = ["build_mruby_sandbox"]
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.add_runtime_dependency "pipe_rpc", "~> 2.
|
24
|
+
spec.add_runtime_dependency "pipe_rpc", "~> 2.1.0"
|
25
25
|
spec.add_development_dependency "bundler", "~> 1.8"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.4"
|
27
27
|
spec.add_development_dependency "rspec-its"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mruby_sandbox
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Aue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pipe_rpc
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|