Bug #6918
closed
Javascript Lowercase for IPv6 addresses prevents use of aliases with capital letters
Added by Jim Pingle about 8 years ago.
Updated almost 8 years ago.
Affected Architecture:
All
Description
If you have an alias, say "Blah", and try to enter it in a field on a firewall rule, it is automatically translated to lowercase in JavaScript. Since "blah" is not the name of the alias (they are case-sensitive), input validation fails.
Affects master, RELENG_2_3 (2.3.3), and RELENG_2_3_2 (2.3.2_x).
See 6df432c3e50c288aa664eec02713457c62d8a8f5
Yes. Confirmed on:
2.3.3-DEVELOPMENT (amd64)
built on Fri Nov 11 16:36:08 CST 2016
FreeBSD 10.3-RELEASE-p12
This essentially prevents creating any rules/NAT etc with aliases with capital letters, so a major issue!
Thanks.
- Status changed from New to Feedback
The PR looks good, appears to do the proper thing in each case. I just merged it in.
- % Done changed from 0 to 100
- Assignee set to Jim Pingle
I'm sorry but this is still broken. I go to Firewall - NAT - Port Forward, there's a rule with an alias called "RAS" used for source. On clicking edit, it gets lowercased to "ras". On saving, it naturally bombs out with "ras is not a valid source IP address or alias."
What's the point of all this messing with letter case?! :(
- Status changed from Feedback to New
- Assignee changed from Jim Pingle to Anonymous
There are more related pending PRs that may help, but I was talking to sbeaver earlier and he had some ideas on how it might be done better.
Kill Bill wrote:
What's the point of all this messing with letter case?! :(
IPv6 spec says addresses must be lowercase, so we have to find a way to properly handle these cases without breaking the spec.
I reverted all these changes until the proper solution is committed.
The 'real' solution here is convert the IPv6 to binary in PHP (compress (?) in PHP dialect) after that, the IPv6 is sanitized and can be saved and printed as requested by spec.
I have added a new function addretolower() to detect if a string is a valid IPv6 address, and if so convert it to lower case. I plan to make my way though the pages that need it over the next few days.
- Status changed from New to Closed
- Target version deleted (
2.4.0)
Also available in: Atom
PDF