sqlite3 1.4.1 → 1.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e623044cbeb457ce05dd65a38cd36f3470bf42d194db814582c5e6914550358
4
- data.tar.gz: a80ca4968643d496ddb4e8b14f509a45c0767e50545e8bf3fec7f953b61ddb8f
3
+ metadata.gz: ff35addc187325a243e752d17c9f38ac54ea4a5b8a48c4809c4dd91692f1f94d
4
+ data.tar.gz: c9c22fc4b4a091197b12ae09c13d199c2fcd5f8c836944bf04f50be919d32f8a
5
5
  SHA512:
6
- metadata.gz: b040bd12646223baabee60c3a79488f12c9697a7561f948245b2c058d2c115270522d2acddf5770a965b0cf1df81c711b3a8a5fde0ad1975e7958bbf1299fa4b
7
- data.tar.gz: 6c24d5561f646245cfeaa3fe17936d33d1bfbcee3d8428102e47c2c9beae2dbcd5be0755197e43accdcd01ecdc8f6cdcab9ae553c87ca8c3bf6507e3afdf1623
6
+ metadata.gz: 68c1c1233ff73049b7c1ff1e0bbeec883bc90228182bd090564ff4df2b9f37fe92e4e9333a374306ba7fcdd10b0b2f914c4116dff0c34ef5c2e964f9342de986
7
+ data.tar.gz: 698263b49e7efa9a3c06220d71e617657fdf31b8e8097a9e2278b5ca3a5fbbb3468b2492fa51670345a3756b4760169d2b79681fac523144166f99253f1e40f3
@@ -1,9 +1,8 @@
1
- sudo: false
2
1
  language: ruby
3
2
  cache: bundler
4
3
  before_install:
5
- - gem update --system
6
- - gem install bundler
4
+ - gem update --system 2.7.7
5
+ - gem install bundler -v 1.16.2
7
6
  addons:
8
7
  apt:
9
8
  packages:
@@ -26,6 +25,8 @@ rvm:
26
25
  - 2.3
27
26
  - 2.4
28
27
  - 2.5
28
+ - 2.6
29
+ - 2.7
29
30
  - ruby-head
30
31
  matrix:
31
32
  allow_failures:
@@ -1,3 +1,15 @@
1
+ === 1.4.2
2
+
3
+ * Travis: Drop unused setting "sudo: false"
4
+ * The taint mechanism will be deprecated in Ruby 2.7
5
+ * Fix Ruby 2.7 rb_check_safe_obj warnings
6
+ * Update travis config
7
+
8
+ === 1.4.1
9
+
10
+ * Don't mandate dl functions for the extention build
11
+ * bumping version
12
+
1
13
  === 1.4.0
2
14
 
3
15
  * Enhancements
@@ -40,11 +40,13 @@ static VALUE rb_sqlite3_open_v2(VALUE self, VALUE file, VALUE mode, VALUE zvfs)
40
40
 
41
41
  Data_Get_Struct(self, sqlite3Ruby, ctx);
42
42
 
43
+ #if defined TAINTING_SUPPORT
43
44
  #if defined StringValueCStr
44
45
  StringValuePtr(file);
45
46
  rb_check_safe_obj(file);
46
47
  #else
47
48
  Check_SafeStr(file);
49
+ #endif
48
50
  #endif
49
51
 
50
52
  status = sqlite3_open_v2(
@@ -213,16 +215,16 @@ VALUE sqlite3val2rb(sqlite3_value * val)
213
215
  return rb_float_new(sqlite3_value_double(val));
214
216
  break;
215
217
  case SQLITE_TEXT:
216
- return rb_tainted_str_new2((const char *)sqlite3_value_text(val));
218
+ return rb_str_new2((const char *)sqlite3_value_text(val));
217
219
  break;
218
220
  case SQLITE_BLOB: {
219
221
  /* Sqlite warns calling sqlite3_value_bytes may invalidate pointer from sqlite3_value_blob,
220
222
  so we explicitly get the length before getting blob pointer.
221
- Note that rb_str_new and rb_tainted_str_new apparently create string with ASCII-8BIT (BINARY) encoding,
223
+ Note that rb_str_new apparently create string with ASCII-8BIT (BINARY) encoding,
222
224
  which is what we want, as blobs are binary
223
225
  */
224
226
  int len = sqlite3_value_bytes(val);
225
- return rb_tainted_str_new((const char *)sqlite3_value_blob(val), len);
227
+ return rb_str_new((const char *)sqlite3_value_blob(val), len);
226
228
  break;
227
229
  }
228
230
  case SQLITE_NULL:
@@ -761,11 +763,13 @@ static VALUE rb_sqlite3_open16(VALUE self, VALUE file)
761
763
 
762
764
  Data_Get_Struct(self, sqlite3Ruby, ctx);
763
765
 
766
+ #if defined TAINTING_SUPPORT
764
767
  #if defined StringValueCStr
765
768
  StringValuePtr(file);
766
769
  rb_check_safe_obj(file);
767
770
  #else
768
771
  Check_SafeStr(file);
772
+ #endif
769
773
  #endif
770
774
 
771
775
  status = sqlite3_open16(utf16_string_value_ptr(file), &ctx->db);
@@ -47,6 +47,10 @@ if RbConfig::CONFIG["host_os"] =~ /mswin/
47
47
  $CFLAGS << ' -W3'
48
48
  end
49
49
 
50
+ if RUBY_VERSION < '2.7'
51
+ $CFLAGS << ' -DTAINTING_SUPPORT'
52
+ end
53
+
50
54
  def asplode missing
51
55
  if RUBY_PLATFORM =~ /mingw|mswin/
52
56
  abort "#{missing} is missing. Install SQLite3 from " +
@@ -151,7 +151,7 @@ static VALUE step(VALUE self)
151
151
  break;
152
152
  case SQLITE_TEXT:
153
153
  {
154
- VALUE str = rb_tainted_str_new(
154
+ VALUE str = rb_str_new(
155
155
  (const char *)sqlite3_column_text(stmt, i),
156
156
  (long)sqlite3_column_bytes(stmt, i)
157
157
  );
@@ -163,7 +163,7 @@ static VALUE step(VALUE self)
163
163
  break;
164
164
  case SQLITE_BLOB:
165
165
  {
166
- VALUE str = rb_tainted_str_new(
166
+ VALUE str = rb_str_new(
167
167
  (const char *)sqlite3_column_blob(stmt, i),
168
168
  (long)sqlite3_column_bytes(stmt, i)
169
169
  );
@@ -1,12 +1,12 @@
1
1
  module SQLite3
2
2
 
3
- VERSION = '1.4.1'
3
+ VERSION = '1.4.2'
4
4
 
5
5
  module VersionProxy
6
6
 
7
7
  MAJOR = 1
8
- MINOR = 3
9
- TINY = 13
8
+ MINOR = 4
9
+ TINY = 2
10
10
  BUILD = nil
11
11
 
12
12
  STRING = [ MAJOR, MINOR, TINY, BUILD ].compact.join( "." )
@@ -105,23 +105,6 @@ class TC_ResultSet < SQLite3::TestCase
105
105
  assert_equal hash[1], "foo"
106
106
  end
107
107
 
108
- def test_tainted_results_as_hash
109
- @db.results_as_hash = true
110
- @result.reset( 1 )
111
- row = @result.next
112
- row.each do |_, v|
113
- assert(v.tainted?) if String === v
114
- end
115
- end
116
-
117
- def test_tainted_row_values
118
- @result.reset( 1 )
119
- row = @result.next
120
- row.each do |v|
121
- assert(v.tainted?) if String === v
122
- end
123
- end
124
-
125
108
  def test_each
126
109
  called = 0
127
110
  @result.reset( 1, 2 )
@@ -198,11 +198,6 @@ module SQLite3
198
198
  assert_equal ['foo'], r
199
199
  end
200
200
 
201
- def test_tainted
202
- r = @stmt.step
203
- assert r.first.tainted?
204
- end
205
-
206
201
  def test_step_twice
207
202
  assert_not_nil @stmt.step
208
203
  assert !@stmt.done?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-04-29 00:00:00.000000000 Z
13
+ date: 2019-12-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: minitest
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '5.11'
21
+ version: '5.13'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '5.11'
28
+ version: '5.13'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: rake-compiler
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -122,14 +122,14 @@ dependencies:
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: '3.17'
125
+ version: '3.20'
126
126
  type: :development
127
127
  prerelease: false
128
128
  version_requirements: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '3.17'
132
+ version: '3.20'
133
133
  description: |-
134
134
  This module allows Ruby programs to interface with the SQLite3
135
135
  database engine (http://www.sqlite.org). You must have the
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
237
237
  - !ruby/object:Gem::Version
238
238
  version: 1.3.5
239
239
  requirements: []
240
- rubygems_version: 3.0.1
240
+ rubygems_version: 3.0.3
241
241
  signing_key:
242
242
  specification_version: 4
243
243
  summary: This module allows Ruby programs to interface with the SQLite3 database engine