Project

General

Profile

Actions

Bug #7249

closed

firewall_rules.php & firewall_nat.php: Replaces underscores with spaces in aliase names

Added by Zetto Null about 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
-
Start date:
02/10/2017
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3.2
Affected Architecture:

Description

I have a number of firewall aliases that contain underscores. The underscore is replaced with a space when viewing a firewall rule that uses the alias.

Steps to reproduce
  1. Create firewall alias that contains an underscore (e.g. "Web_TCP" or "Amazon_Servers")
  2. Create firewall rule that uses the alias as a source, source port, destination or destination port.
  3. The resulting firewall rules view will display the alias with a space instead of an underscore (e.g. "Web TCP" or "Amazon Servers")

This occurs with both IP and Port aliases. Using Firefox/Chrome inspector shows that the underscore has been replaced with a space. Editing the firewall rule lists the correct alias with the underscore.

Thank you to the pfSense/Netgate team for all of your handwork!

Actions #1

Updated by Anonymous about 7 years ago

That is not exactly a bug, the underscore is deliberately replaced with a space for display. It seems to have been a PR to allow the alias name to line-wrap if very long. There may be a better way.

Actions #2

Updated by Anonymous about 7 years ago

  • Subject changed from Web Interface replaces firewall aliases that contain underscores with spaces to firewall_rules.php & firewall_nat.php: Replaces underscores with spaces in aliase names
  • Status changed from New to Feedback
  • Assignee set to Zetto Null

Changed the code to replace '_' with '_<wbr>' (word break opportunity). Allows a long alias name to word-wrap, but retains the '_'.

Actions #3

Updated by Zetto Null about 7 years ago

Steve Beaver wrote:

Changed the code to replace '_' with '_<wbr>' (word break opportunity). Allows a long alias name to word-wrap, but retains the '_'.

Thank you Steve! I'm guessing this will miss the window for 2.3.3?

Actions #4

Updated by Anonymous about 7 years ago

Yes. Missed it by an hour :)

Actions #5

Updated by BBcan177 . about 7 years ago

Cool... This will help pfBlockerNG as all the Auto rules are pfB_<aliasname>_v4... Thanks Steve!

Actions #6

Updated by NOYB NOYB about 7 years ago

So what is the actual issue that replacing the underscore with space in the displaying of the rules creates? Is there some functionality lost? It is only visual. And since the names cannot actually contain spaces, any where a space is displayed it is known to be an underscore.

Really don't see this as an issue. The <wbr> approach was intentionally avoided because hanging underscores are unappealing.

Why should pfBlockerNB be impacted by the display. The names/values are not actually changed.

I would like to request that this be reverted back to a plain space.

Thanks

P.S. So thankful this missed 2.3.3

Actions #7

Updated by Zetto Null about 7 years ago

NOYB NOYB wrote:

So what is the actual issue that replacing the underscore with space in the displaying of the rules creates? Is there some functionality lost? It is only visual. And since the names cannot actually contain spaces, any where a space is displayed it is known to be an underscore.

Really don't see this as an issue. The <wbr> approach was intentionally avoided because hanging underscores are unappealing.

Why should pfBlockerNB be impacted by the display. The names/values are not actually changed.

I would like to request that this be reverted back to a plain space.

Thanks

P.S. So thankful this missed 2.3.3

If a user uses an underscore in an alias name then they expect that to be reflected when the alias is used. I'm failing to see how this impacts you. If you don't like it, don't use an underscore in any of your aliases.

It looks like this wasn't pushed to 2.3.3-p1. What's needed to get this in the next release?

Actions #8

Updated by Jim Pingle over 6 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF