Todo #13959
closedTrim blank characters from static IP address fields on the Interface configuration page
100%
Description
A days ago i have a trouble configuring Unbound.
When adding a service in a new interface (only in IPv6) the test is not completed, i checked the test file and i see a space character in line of new interface and this lead me to discovery a error in Static IPv6 Configuration in interfaces page.
A space character is the troublemaker with IPv6, think is come when i pasted from my notes accidentaly
With space
Without space
I removed this space and everything works normally.
After, i tried to add a space character in the static IPv4 configuration to reproduce the error and it doesn't accept it, should have the same behavior in the correct static IPv6? Do not sure if is a bug but i reporting to contribute
Files
Updated by Jim Pingle almost 2 years ago
- Target version set to 2.7.0
- Plus Target Version set to 23.05
It shouldn't be letting that through.
It should either be doing a trim()
on the input to remove whitespace or it should be triggering an input validation error.
Updated by Jim Pingle over 1 year ago
For whatever reason, is_ipaddrv4() rejects the address when it has extra blank space but the IPv6 version does not. I added a trim to both paths so that both would have the extra blank space removed before the validity tests. Now if I submit an IPv4 or IPv6 address with extra space around it, it's accepted and stored with the extra space removed as expected.
Updated by Jim Pingle over 1 year ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset b959ca071e503e59f6f361d411b0bc62a12d5821.
Updated by Jim Pingle over 1 year ago
- Tracker changed from Bug to Todo
- Subject changed from Interface page accepting empty characters on Static IPv6 Configuration to Trim blank characters from static IP address fields on the Interface configuration page
- Affected Version deleted (
2.7.x) - Affected Architecture deleted (
All)
Updating subject for release notes.
Updated by Jordan G over 1 year ago
Looks good on 23.05.a.20230421.0022 - adding space(s) on the leading or trailing end of static IPv6 address in interface configuration results in space(s) being trimmed and valid address being applied; using invalid characters or format results in invalidation of attempted address along with associated message.