hardening: bracket a bare IPv6 nameserver literal (was unparseable -> rDNS/DNSBL silently degraded on v6-only hosts); saturating chunk-size advance in the RPC dechunker (a 16-hex-digit size could overflow-panic the worker); connclass hash= is now last-wins to match password= under parent= inheritance
This commit is contained in:
parent
1a5c41871c
commit
78a6574d64
3 changed files with 13 additions and 4 deletions
|
|
@ -138,10 +138,12 @@ fn build(s: &Server, name: &str) -> Option<ConnClass> {
|
|||
resolvehostnames: true,
|
||||
..Default::default()
|
||||
};
|
||||
// resolve the hash algorithm independently of token order (see `apply`'s `hash`)
|
||||
// resolve the hash algorithm independently of token order, taking the LAST `hash=`
|
||||
// (a child's overrides a parent's) to match `password=`'s last-wins semantics
|
||||
let hash_algo = toks
|
||||
.iter()
|
||||
.find_map(|t| t.strip_prefix("hash="))
|
||||
.filter_map(|t| t.strip_prefix("hash="))
|
||||
.last()
|
||||
.map(str::to_string);
|
||||
for tok in &toks {
|
||||
if let Some((k, v)) = tok.split_once('=') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue