mumuki-javascript-runner 1.3.3 → 1.3.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec3828b95e23b39b3306bcb2a507cde9acbf3d98d444e9dd5bb95cf3c648a915
4
- data.tar.gz: b286fa2b2764f084c4f1763cfabcace5e4a975403039d40d89ed20adf4872264
3
+ metadata.gz: abbae54f53eb61d8c168cb7205b79695911762fbd0a6152aa1f5970ab42048e6
4
+ data.tar.gz: a3b1720e6d08c52c58cd5e85ea3595f40c993f4f8d9143ffc3d73b12dc155554
5
5
  SHA512:
6
- metadata.gz: d717df05b3e3dd99882730c368c13a753264d63bd6c8ded6b60eb13f90feef16a301b5ac240b9ac5bc67bb7b812f3222fbdb680b243da3bbc9c397f711b56e3a
7
- data.tar.gz: e27e945d2adbe2720a3204a87f9a70ebc180eb26b2ae61bebb0ed9103dd81af91308529835ee4bd9e82baebe8e8de57d0ae1c56d209427a4ee7caceb285e43af
6
+ metadata.gz: e026121fce5a338302324fff1b67c69a7fd61698e70b715dc03e27e90f5741f40410995885ab16870879ad669655b1873fba0fbf03a569f4ee57c785388d5ee1
7
+ data.tar.gz: 6ad1cf24cdbcb8ceb1477cc33fae853f8f9eb3502712064a26c5191308ef6b25e34dab0162fe22b1accbaa95a56996abf8dff0e78a6e66f7ff5c775bc3cce84f
@@ -1,9 +1,9 @@
1
1
  class JavascriptValidationHook < Mumukit::Hook
2
2
  def validate!(request)
3
3
  matches = request_matches?(request) do |it|
4
- it =~ /\W*(require|process|os|fs|eval|cluster|v8|vm|tty|tls|root|global|crypto|stream|events)\W*/
4
+ it =~ /(^|\W+)(require|process|os|fs|eval|cluster|v8|vm|tty|tls|root|global|crypto|stream|events)(\W+|$)/
5
5
  end
6
- raise Mumukit::RequestValidationError, "You can not use #{$1} here" if matches
6
+ raise Mumukit::RequestValidationError, "You can not use #{$2} here" if matches
7
7
  end
8
8
 
9
9
  private
@@ -1,3 +1,3 @@
1
1
  module JavascriptVersionHook
2
- VERSION = '1.3.3'
2
+ VERSION = '1.3.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mumuki-javascript-runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Franco Leonardo Bulgarelli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-27 00:00:00.000000000 Z
11
+ date: 2018-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mumukit