mirror of
https://github.com/miekg/dns.git
synced 2025-10-18 05:11:01 +02:00
Ignore empty lines when parsing private keys (#911)
When migrating zones to CoreDNS, it did not accept private key files the former bind setup gracefully accepted. It turned out they had a trailing newline for whateveer reason. The dns library should handle them gracefully, too.
This commit is contained in:
parent
12ac8fb6e8
commit
092d7745b4
@ -322,6 +322,11 @@ func (kl *klexer) Next() (lex, bool) {
|
||||
commt = false
|
||||
}
|
||||
|
||||
if kl.key && str.Len() == 0 {
|
||||
// ignore empty lines
|
||||
break
|
||||
}
|
||||
|
||||
kl.key = true
|
||||
|
||||
l.value = zValue
|
||||
|
Loading…
x
Reference in New Issue
Block a user