mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-08-08 08:33:56 +02:00
Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ea1d4baa04 | ||
![]() |
944d3fbc5d | ||
![]() |
78721c5b15 | ||
![]() |
fce992b842 | ||
![]() |
a2a51d63ac | ||
![]() |
b19213d099 | ||
![]() |
ede79802d3 | ||
![]() |
d4483b02a2 | ||
![]() |
1fbad10a24 | ||
![]() |
da28c76a68 | ||
![]() |
e5c66824ab | ||
3d787a46ea | |||
3a5b1bcb27 | |||
![]() |
d066b3ecee |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,5 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
## 3.7.2 (November 10th, 2022)
|
||||
|
||||
OTHER:
|
||||
|
||||
- re-release 3.7.1 to rebuild Docker image with security vulnerabilities fixes
|
||||
|
||||
## 3.7.1 (September 20th, 2022)
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
||||
- fix [TypeError](https://github.com/cmur2/dyndnsd/issues/205) when user has no hosts configured
|
||||
|
||||
## 3.7.0 (September 16th, 2022)
|
||||
|
||||
IMPROVEMENTS:
|
||||
|
4
Rakefile
4
Rakefile
@@ -22,10 +22,10 @@ namespace :solargraph do
|
||||
end
|
||||
|
||||
# renovate: datasource=github-tags depName=hadolint/hadolint
|
||||
hadolint_version = 'v2.10.0'
|
||||
hadolint_version = 'v2.12.0'
|
||||
|
||||
# renovate: datasource=github-tags depName=aquasecurity/trivy
|
||||
trivy_version = 'v0.31.3'
|
||||
trivy_version = 'v0.34.0'
|
||||
|
||||
namespace :docker do
|
||||
ci_image = 'cmur2/dyndnsd:ci'
|
||||
|
@@ -30,9 +30,9 @@ Gem::Specification.new do |s|
|
||||
s.add_runtime_dependency 'async', '~> 1.30.0'
|
||||
s.add_runtime_dependency 'async-dns', '~> 1.3.0'
|
||||
s.add_runtime_dependency 'metriks'
|
||||
s.add_runtime_dependency 'opentelemetry-exporter-jaeger', '~> 0.21.0'
|
||||
s.add_runtime_dependency 'opentelemetry-instrumentation-rack', '~> 0.20.0'
|
||||
s.add_runtime_dependency 'opentelemetry-sdk', '~> 1.0.0.rc2'
|
||||
s.add_runtime_dependency 'opentelemetry-exporter-jaeger', '~> 0.22.0'
|
||||
s.add_runtime_dependency 'opentelemetry-instrumentation-rack', '~> 0.21.0'
|
||||
s.add_runtime_dependency 'opentelemetry-sdk', '~> 1.2.0'
|
||||
s.add_runtime_dependency 'rack', '~> 3.0'
|
||||
s.add_runtime_dependency 'rackup'
|
||||
s.add_runtime_dependency 'webrick', '>= 1.6.1'
|
||||
@@ -42,8 +42,8 @@ Gem::Specification.new do |s|
|
||||
s.add_development_dependency 'rack-test'
|
||||
s.add_development_dependency 'rake'
|
||||
s.add_development_dependency 'rspec'
|
||||
s.add_development_dependency 'rubocop', '~> 1.36.0'
|
||||
s.add_development_dependency 'rubocop', '~> 1.38.0'
|
||||
s.add_development_dependency 'rubocop-rake', '~> 0.6.0'
|
||||
s.add_development_dependency 'rubocop-rspec', '~> 2.13.1'
|
||||
s.add_development_dependency 'solargraph', '~> 0.46.0'
|
||||
s.add_development_dependency 'rubocop-rspec', '~> 2.15.0'
|
||||
s.add_development_dependency 'solargraph', '~> 0.47.0'
|
||||
end
|
||||
|
@@ -215,10 +215,11 @@ module Dyndnsd
|
||||
invalid_hostnames = hostnames.select { |h| !Helper.fqdn_valid?(h, @domain) }
|
||||
return [422, {'X-DynDNS-Response' => 'hostname_malformed'}, []] if invalid_hostnames.any?
|
||||
|
||||
# we can trust this information since user was authorized by middleware
|
||||
user = env['REMOTE_USER']
|
||||
|
||||
# check for hostnames that the user does not own
|
||||
forbidden_hostnames = hostnames - @users[user]['hosts']
|
||||
forbidden_hostnames = hostnames - @users[user].fetch('hosts', [])
|
||||
return [422, {'X-DynDNS-Response' => 'host_forbidden'}, []] if forbidden_hostnames.any?
|
||||
|
||||
if params['offline'] == 'YES'
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Dyndnsd
|
||||
VERSION = '3.7.0'
|
||||
VERSION = '3.7.2'
|
||||
end
|
||||
|
@@ -15,6 +15,9 @@ describe Dyndnsd::Daemon do
|
||||
'test' => {
|
||||
'password' => 'secret',
|
||||
'hosts' => ['foo.example.org', 'bar.example.org']
|
||||
},
|
||||
'test2' => {
|
||||
'password' => 'ihavenohosts'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,6 +102,14 @@ describe Dyndnsd::Daemon do
|
||||
expect(last_response.body).to eq('notfqdn')
|
||||
end
|
||||
|
||||
it 'rejects request if user does not own any hostnames' do
|
||||
authorize 'test2', 'ihavenohosts'
|
||||
|
||||
get '/nic/update?hostname=doesnotexisthost.example.org'
|
||||
expect(last_response).to be_ok
|
||||
expect(last_response.body).to eq('nohost')
|
||||
end
|
||||
|
||||
it 'rejects request if user does not own one hostname' do
|
||||
authorize 'test', 'secret'
|
||||
|
||||
|
Reference in New Issue
Block a user