sqreen 1.8.4 → 1.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sqreen/rules_callbacks/reflected_xss.rb +5 -5
- data/lib/sqreen/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f399192916d62e32ac7dc431d7f9567451b3b4c
|
4
|
+
data.tar.gz: c50f2371cedb78ea513b13773da2fcab80786994
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98569486b7c5344745d4542f0a856673db74431f703ee96c192c0b28efda36ddefc6ee88978ef93f4bea7a7a92264c9eba55c52a3b03de16ed461bec4d88b3a0
|
7
|
+
data.tar.gz: 16bc37bfdbf917d013f66559cf34431e1ac39c62678cd3ad9aab2c66d2f6b8ac084dc15fea24b2f00e8da2b9aeff81938f2f6418c5e325e98d5c9a8b2be2c16f
|
@@ -90,7 +90,7 @@ module Sqreen
|
|
90
90
|
if escape_html == false &&
|
91
91
|
text.respond_to?(:include?) &&
|
92
92
|
!text.include?('html_escape')
|
93
|
-
args[0].replace("Sqreen.escape_haml(#{args[0]})")
|
93
|
+
args[0].replace("Sqreen.escape_haml((#{args[0]}))")
|
94
94
|
end
|
95
95
|
nil
|
96
96
|
end
|
@@ -104,7 +104,7 @@ module Sqreen
|
|
104
104
|
if tag.value[:escape_html] == false &&
|
105
105
|
tag.value[:value].respond_to?(:include?) &&
|
106
106
|
!tag.value[:value].include?('html_escape')
|
107
|
-
tag.value[:value] = "Sqreen.escape_haml(#{tag.value[:value]})"
|
107
|
+
tag.value[:value] = "Sqreen.escape_haml((#{tag.value[:value]}))"
|
108
108
|
return { :status => :override, :new_return_value => tag }
|
109
109
|
end
|
110
110
|
nil
|
@@ -126,7 +126,7 @@ module Sqreen
|
|
126
126
|
else
|
127
127
|
content = eval('"' + Haml::Util.balance(scan, '{', '}', 1)[0][0...-1] + '"')
|
128
128
|
content = "Haml::Helpers.html_escape((#{content}))" if escape_html
|
129
|
-
res << '#{Sqreen.escape_haml(' + content + ')}' # Use eval to get rid of string escapes
|
129
|
+
res << '#{Sqreen.escape_haml((' + content + '))}' # Use eval to get rid of string escapes
|
130
130
|
end
|
131
131
|
end
|
132
132
|
{ :status => :skip, :new_return_value => res + rest }
|
@@ -180,7 +180,7 @@ module Sqreen
|
|
180
180
|
|
181
181
|
class Haml5EscapableHookCB < RuleCB
|
182
182
|
def pre(_inst, *args, &_block)
|
183
|
-
args[0] = "Sqreen.escape_haml(#{args[0]})"
|
183
|
+
args[0] = "Sqreen.escape_haml((#{args[0]}))"
|
184
184
|
{ :status => :modify_args, :args => args }
|
185
185
|
end
|
186
186
|
end
|
@@ -188,7 +188,7 @@ module Sqreen
|
|
188
188
|
# Hook into temple template rendering
|
189
189
|
class TempleEscapableHookCB < RuleCB
|
190
190
|
def post(ret, _inst, *_args, &_block)
|
191
|
-
ret[1] = "Sqreen.escape_temple(#{ret[1]})"
|
191
|
+
ret[1] = "Sqreen.escape_temple((#{ret[1]}))"
|
192
192
|
{ :status => :override, :new_return_value => ret }
|
193
193
|
end
|
194
194
|
end
|
data/lib/sqreen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqreen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sqreen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: execjs
|