dyndnsd 3.6.2 → 3.7.1

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: 36982dc3ced66ccf671b87d264f633ddeb8b716241b03cd65753bde1ecd17172
4
- data.tar.gz: 6e24b422185ac2b087187d0e98af4990816758ea62e69dfdc37e43b795bc16cc
3
+ metadata.gz: 7df3dddeea8fe967ba98a8078e228e5ee1f880bed4aceb51028dfd2668a8464d
4
+ data.tar.gz: db2da220cb3dcfcfe2179ef239aeb43f5494eb6d04180d4322ade66817694277
5
5
  SHA512:
6
- metadata.gz: fa739e555ba66263f93cc2b78b83eab7d8ea95336a2bcf00e78c069abebd795f40b553cde0294b490f86d0220c41223e7b369cd9fb1bc83ad7618ec310df2219
7
- data.tar.gz: 1b2d280c60679d02f005a2709aec0dc17f9e84a538fc3ff0caa8472a6d7c081c19a8dafa233c8da67457a5c7bd74946739f193cc6e00d26bde81841d0bba0fa2
6
+ metadata.gz: 89cdcb8c77dfff68cbc84a77e487cb315118c035c6e72c669e008e3f68da3e5d3eede25897709a636f248234c83733258e82a100669c9894eb60fa2dae6572eb
7
+ data.tar.gz: 9fd32463d526769215c3a3c9e9d98f39cfca63678168a5cb610491557eebc486f7da74d66ba9549a802ffba41cebc8faf6d9b95707902005967a03af5ed5398c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.7.1 (September 20th, 2022)
4
+
5
+ IMPROVEMENTS:
6
+
7
+ - fix [TypeError](https://github.com/cmur2/dyndnsd/issues/205) when user has no hosts configured
8
+
9
+ ## 3.7.0 (September 16th, 2022)
10
+
11
+ IMPROVEMENTS:
12
+
13
+ - Update to Rack 3
14
+
3
15
  ## 3.6.2 (August 11th, 2022)
4
16
 
5
17
  OTHER:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dyndnsd
4
- VERSION = '3.6.2'
4
+ VERSION = '3.7.1'
5
5
  end
data/lib/dyndnsd.rb CHANGED
@@ -7,6 +7,7 @@ require 'ipaddr'
7
7
  require 'json'
8
8
  require 'yaml'
9
9
  require 'rack'
10
+ require 'rackup'
10
11
  require 'metriks'
11
12
  require 'opentelemetry/instrumentation/rack'
12
13
  require 'opentelemetry/sdk'
@@ -214,10 +215,11 @@ module Dyndnsd
214
215
  invalid_hostnames = hostnames.select { |h| !Helper.fqdn_valid?(h, @domain) }
215
216
  return [422, {'X-DynDNS-Response' => 'hostname_malformed'}, []] if invalid_hostnames.any?
216
217
 
218
+ # we can trust this information since user was authorized by middleware
217
219
  user = env['REMOTE_USER']
218
220
 
219
221
  # check for hostnames that the user does not own
220
- forbidden_hostnames = hostnames - @users[user]['hosts']
222
+ forbidden_hostnames = hostnames - @users[user].fetch('hosts', [])
221
223
  return [422, {'X-DynDNS-Response' => 'host_forbidden'}, []] if forbidden_hostnames.any?
222
224
 
223
225
  if params['offline'] == 'YES'
@@ -259,10 +261,10 @@ module Dyndnsd
259
261
  # @return [void]
260
262
  private_class_method def self.setup_traps
261
263
  Signal.trap('INT') do
262
- Rack::Handler::WEBrick.shutdown
264
+ Rackup::Handler::WEBrick.shutdown
263
265
  end
264
266
  Signal.trap('TERM') do
265
- Rack::Handler::WEBrick.shutdown
267
+ Rackup::Handler::WEBrick.shutdown
266
268
  end
267
269
  end
268
270
 
@@ -350,7 +352,7 @@ module Dyndnsd
350
352
 
351
353
  app = OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware.new(app)
352
354
 
353
- Rack::Handler::WEBrick.run app, Host: config['host'], Port: config['port']
355
+ Rackup::Handler::WEBrick.run app, Host: config['host'], Port: config['port']
354
356
  end
355
357
  end
356
358
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dyndnsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.2
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Nicolai
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-11 00:00:00.000000000 Z
11
+ date: 2022-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -58,56 +58,70 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.21.0
61
+ version: 0.22.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.21.0
68
+ version: 0.22.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: opentelemetry-instrumentation-rack
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.20.0
75
+ version: 0.21.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.20.0
82
+ version: 0.21.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: opentelemetry-sdk
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 1.0.0.rc2
89
+ version: 1.2.0
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 1.0.0.rc2
96
+ version: 1.2.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rack
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '2.0'
103
+ version: '3.0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '2.0'
110
+ version: '3.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rackup
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
126
  name: webrick
113
127
  requirement: !ruby/object:Gem::Requirement
@@ -198,14 +212,14 @@ dependencies:
198
212
  requirements:
199
213
  - - "~>"
200
214
  - !ruby/object:Gem::Version
201
- version: 1.34.1
215
+ version: 1.36.0
202
216
  type: :development
203
217
  prerelease: false
204
218
  version_requirements: !ruby/object:Gem::Requirement
205
219
  requirements:
206
220
  - - "~>"
207
221
  - !ruby/object:Gem::Version
208
- version: 1.34.1
222
+ version: 1.36.0
209
223
  - !ruby/object:Gem::Dependency
210
224
  name: rubocop-rake
211
225
  requirement: !ruby/object:Gem::Requirement
@@ -226,28 +240,28 @@ dependencies:
226
240
  requirements:
227
241
  - - "~>"
228
242
  - !ruby/object:Gem::Version
229
- version: 2.12.0
243
+ version: 2.13.1
230
244
  type: :development
231
245
  prerelease: false
232
246
  version_requirements: !ruby/object:Gem::Requirement
233
247
  requirements:
234
248
  - - "~>"
235
249
  - !ruby/object:Gem::Version
236
- version: 2.12.0
250
+ version: 2.13.1
237
251
  - !ruby/object:Gem::Dependency
238
252
  name: solargraph
239
253
  requirement: !ruby/object:Gem::Requirement
240
254
  requirements:
241
255
  - - "~>"
242
256
  - !ruby/object:Gem::Version
243
- version: 0.45.0
257
+ version: 0.46.0
244
258
  type: :development
245
259
  prerelease: false
246
260
  version_requirements: !ruby/object:Gem::Requirement
247
261
  requirements:
248
262
  - - "~>"
249
263
  - !ruby/object:Gem::Version
250
- version: 0.45.0
264
+ version: 0.46.0
251
265
  description: A small, lightweight and extensible DynDNS server written with Ruby and
252
266
  Rack.
253
267
  email: