Project

General

Profile

Bug #6864

Error checking rejects IPv6 addresses with upper case A-F.

Added by Steve Wheeler 5 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Start date:
10/19/2016
Due date:
% Done:

100%

Affected version:
2.3.x
Affected Architecture:
All

Description

Recent browser changes mean this is rejected before the form is submitted and the error tool tip shown is unhelpful.

Either allowing upper case characters and converting them to lower case to meet the standard or displaying an error that allow the user to make that change would solve this.

Associated revisions

Revision d461ff40
Added by Phillip Davis 5 months ago

Fix #6864 automatically convert IPv6 input to lowercase

1) As the user leaves the field, or presses Save, onChange will fire and
convert the input string to lowercase. This saves the user havng to even
think about it.
2) Provide some extra text that describes the expected format, to avoid
them getting just "Please match the requested format"

Revision 81cc31e1
Added by Luiz Otavio O Souza 5 months ago

Merge pull request #3199 from phil-davis/ipv6lower

Revision 6df432c3
Added by Phillip Davis 4 months ago

Fix #6864 automatically convert IPv6 input to lowercase

1) As the user leaves the field, or presses Save, onChange will fire and
convert the input string to lowercase. This saves the user havng to even
think about it.
2) Provide some extra text that describes the expected format, to avoid
them getting just "Please match the requested format"

(cherry picked from commit d461ff40e364fc0ecc003b9f673cbad7c6a08f2f)

Revision 3a66c0da
Added by Phillip Davis 4 months ago

Fix #6864 automatically convert IPv6 input to lowercase

1) As the user leaves the field, or presses Save, onChange will fire and
convert the input string to lowercase. This saves the user havng to even
think about it.
2) Provide some extra text that describes the expected format, to avoid
them getting just "Please match the requested format"

(cherry picked from commit d461ff40e364fc0ecc003b9f673cbad7c6a08f2f)

History

#1 Updated by Phillip Davis 5 months ago

Pull request: https://github.com/pfsense/pfsense/pull/3198
That makes the "Please match the requested format:" text more helpful.

It would also be nice to automagically convert to lowercase as the characters are typed or pasted into the field.

#2 Updated by Luiz Otavio O Souza 5 months ago

While I think it is cool to convert the characters as you type, the GUI has to accept upper case letters as well.

Once the IPv6 address is sanitized, all the IPv6 address in pfSense must use/print only lower case letters.

#3 Updated by Phillip Davis 5 months ago

This one also automatically converts the input to lowercase as the user leaves the IP Address field, or presses a button somewhere else (like Save):
https://github.com/pfsense/pfsense/pull/3199

#4 Updated by Jim Thompson 5 months ago

  • Assignee set to Luiz Otavio O Souza

Take a look at Phil's patch. If it needs rework kick back to either he or I.

#5 Updated by Phillip Davis 5 months ago

Note: The pull request generated discussion about whether users should have the option to record IPv6 addresses with their choice of upper or lower case A-F,a-f, and store it in the config as the user has entered it. Then the back-end code would convert to lower case on the fly when making use of the addresses to drive the system.

Regardless of that, the existing behaviour is requiring that lower case be entered. The pull request simply automates this process and gives some help text to give the user more clue about what to enter. So the PR does not change existing underlying behaviour.

If someone wants to discuss the overall policy of stored format of IPv6 addresses in the config, then fine. But the PR is not about that.

#6 Updated by Phillip Davis 5 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#7 Updated by Jim Pingle 4 months ago

This appears to have broken the use of Aliases that have names using capital letters. See #6918

#8 Updated by Jim Pingle 4 months ago

  • Status changed from Feedback to New

#9 Updated by Renato Botelho 4 months ago

  • Assignee changed from Luiz Otavio O Souza to Steve Beaver

#10 Updated by Steve Beaver 4 months ago

See #6918
A new function has been provided to force IPv6 to lower case on save. This is being added to GUI pages as required

#11 Updated by Steve Beaver 4 months ago

  • Status changed from New to Assigned

Force IPv6 to lowercase via addrtolower() has been added to:

firewall_aliases_edit.php
firewall_rules_edit.php

More to come

#12 Updated by Phillip Davis 2 months ago

interfaces.php also has addrtolower()

#13 Updated by Steve Beaver about 2 months ago

  • Status changed from Assigned to Resolved

#14 Updated by Jim Pingle about 1 month ago

  • Target version changed from 2.4.0 to 2.3.3

Also available in: Atom PDF