Project

General

Profile

Actions

Todo #13959

closed

Trim blank characters from static IP address fields on the Interface configuration page

Added by william costa almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Interfaces
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.05
Release Notes:
Default

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
with space

Without 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

clipboard-202302152110-nk7h4.png (16.8 KB) clipboard-202302152110-nk7h4.png with space william costa, 02/15/2023 06:10 PM
clipboard-202302152111-fuw7m.png (16.7 KB) clipboard-202302152111-fuw7m.png without space william costa, 02/15/2023 06:11 PM
Actions #1

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.

Actions #2

Updated by Jim Pingle over 1 year ago

  • Assignee set to Jim Pingle
Actions #3

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.

Actions #4

Updated by Jim Pingle over 1 year ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #5

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.

Actions #6

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.

Actions #7

Updated by Jim Pingle over 1 year ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF