The console's IPv6 address check accepts a dotted quad followed by ::, which is not a valid address #420
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil#420
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is wrong
isIpv6Addressinsrc/angular/src/app/shared/ip-address/ip-address.util.tsaccepts an address whose dotted quad is followed by:::isIpv6Address1.2.3.4::192.0.2.1::0:1.2.3.4::0:0:192.0.2.1::RFC 4291 section 2.2 allows the dotted quad only as the last 32 bits of the address. The function checks only that the dotted group is the last of the groups it split out, so a trailing
::after it goes unnoticed.Found while verifying #198: a run of 51,443 texts through
isIpv6Addressand the sharedparseIpv6gave 124 disagreements, all of this one form (zero to two hex groups, a dotted quad, then::).parseIpv6refuses them, which is right.Effect
A console field validated with
isIpv6Addressaccepts such text. Where the value then goes toparseIpv6the user gets that parser's error instead of the field's own; where it goes straight to the API, the server refuses it.Wanted
isIpv6Addressreturns false when a dotted quad is not the last 32 bits, a trailing::included.ip-address.util.spec.tsgains1.2.3.4::(it was left out because the two functions disagree on it).