MYSQLSafe 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/MYSQLSafe/base.rb +9 -2
- data/lib/MYSQLSafe/version.rb +1 -1
- metadata +2 -2
data/lib/MYSQLSafe/base.rb
CHANGED
@@ -78,9 +78,16 @@ module MYSQLSafe
|
|
78
78
|
|
79
79
|
def match_name(name_array, sql)
|
80
80
|
match = []
|
81
|
-
|
81
|
+
arrayable_sql = sql
|
82
|
+
|
82
83
|
name_array.each do |name|
|
83
|
-
|
84
|
+
containing_characters = ["\"", "'", "`", ",", "(", ")", ".", "=", ";"]
|
85
|
+
containing_characters.each do |illegal|
|
86
|
+
arrayable_sql = arrayable_sql.gsub(illegal, ' ')
|
87
|
+
end
|
88
|
+
arrayable_sql.split(" ").each do |word|
|
89
|
+
match.push(name) if word == "#{name.strip}"
|
90
|
+
end
|
84
91
|
end
|
85
92
|
|
86
93
|
if match.size > 0
|
data/lib/MYSQLSafe/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: MYSQLSafe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|