scout_apm 1.5.4 → 1.5.5

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
  SHA1:
3
- metadata.gz: 0494dfededbaa29426c0b087bb80e97f865ed237
4
- data.tar.gz: dcbbf372d00781f4aa349d4a343650558599fb3c
3
+ metadata.gz: ca18811f4b9adad075737c7321340025345f1c14
4
+ data.tar.gz: ca2873e587e8d70fc1a3bffe564b59cde10b0f85
5
5
  SHA512:
6
- metadata.gz: 11b61029f1561d2ed7806224f219e8c177cc38f9cce5165a1f91eed25786f50edfae50545ab77c974b92c71386a614ed4f4f2658ee2d190f356aedf6ab0d7bac
7
- data.tar.gz: 1c4ff4b60d1c27ec6f4df40435fa0f96feb60c18e633e6be1cbfb6c90d09e480e954d4a2c39935ea02373d939dfdd20aeccf31c582c0321ce8114a208d4fb77b
6
+ metadata.gz: 7a4e009a252a824a6e22bde107ad671e6c017767ad6d96960ecdf056e0ccef3761e6d8d9abe984ec533246c8f34ccba71cc53ce4f7e3012dc2fb2b7173104578
7
+ data.tar.gz: d45a047c05341ef7da71c1b38a370d78f3e854a54b27ecac7a1bd33a37fd88bb4b30bd1c7d7fd2f897999a1b85e06d2e62437204d115152bd84470f7a36e9497
data/CHANGELOG.markdown CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.5.5
2
+
3
+ * Handle backslash escaped quotes inside mysql strings.
4
+
1
5
  # 1.5.4
2
6
 
3
7
  * Fix issue where error counts were being misreported
@@ -13,8 +13,8 @@ module ScoutApm
13
13
 
14
14
  MYSQL_VAR_INTERPOLATION = %r|\[\[.*\]\]\s*$|.freeze
15
15
  MYSQL_REMOVE_INTEGERS = /(?<!LIMIT )\b\d+\b/.freeze
16
- MYSQL_REMOVE_SINGLE_QUOTE_STRINGS = /'(?:[^']|'')*'/.freeze
17
- MYSQL_REMOVE_DOUBLE_QUOTE_STRINGS = /"(?:[^"]|"")*"/.freeze
16
+ MYSQL_REMOVE_SINGLE_QUOTE_STRINGS = %r{'(?:\\'|[^']|'')*'}.freeze
17
+ MYSQL_REMOVE_DOUBLE_QUOTE_STRINGS = %r{"(?:\\"|[^"]|"")*"}.freeze
18
18
  MYSQL_IN_CLAUSE = /IN\s+\(\?[^\)]*\)/.freeze
19
19
 
20
20
  SQLITE_VAR_INTERPOLATION = %r|\[\[.*\]\]\s*$|.freeze
@@ -13,8 +13,8 @@ module ScoutApm
13
13
 
14
14
  MYSQL_VAR_INTERPOLATION = %r|\[\[.*\]\]\s*$|.freeze
15
15
  MYSQL_REMOVE_INTEGERS = /\b\d+\b/.freeze
16
- MYSQL_REMOVE_SINGLE_QUOTE_STRINGS = /'(?:[^']|'')*'/.freeze
17
- MYSQL_REMOVE_DOUBLE_QUOTE_STRINGS = /"(?:[^"]|"")*"/.freeze
16
+ MYSQL_REMOVE_SINGLE_QUOTE_STRINGS = /'(?:\\'|[^']|'')*'/.freeze
17
+ MYSQL_REMOVE_DOUBLE_QUOTE_STRINGS = /"(?:\\"|[^"]|"")*"/.freeze
18
18
  MYSQL_IN_CLAUSE = /IN\s+\(\?[^\)]*\)/.freeze
19
19
 
20
20
  SQLITE_VAR_INTERPOLATION = %r|\[\[.*\]\]\s*$|.freeze
@@ -1,4 +1,4 @@
1
1
  module ScoutApm
2
- VERSION = "1.5.4"
2
+ VERSION = "1.5.5"
3
3
  end
4
4
 
@@ -85,6 +85,12 @@ module ScoutApm
85
85
  assert_equal %q|SELECT `blogs`.* FROM `blogs` WHERE (title = ?)|, ss.to_s
86
86
  end
87
87
 
88
+ def test_mysql_quotes
89
+ sql = %q|INSERT INTO `users` VALUES ('foo', 'b\'ar')|
90
+ ss = SqlSanitizer.new(sql).tap{ |it| it.database_engine = :mysql }
91
+ assert_equal %q|INSERT INTO `users` VALUES (?, ?)|, ss.to_s
92
+ end
93
+
88
94
  def test_scrubs_invalid_encoding
89
95
  sql = "SELECT `blogs`.* FROM `blogs` WHERE (title = 'a\255c')".force_encoding('UTF-8')
90
96
  assert_equal false, sql.valid_encoding?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derek Haynes
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-19 00:00:00.000000000 Z
12
+ date: 2016-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: minitest