Project

General

Profile

Bug #7294

Lenght of description of firewall rules

Added by Pablo Trincavelli 29 days ago. Updated 21 days ago.

Status:
New
Priority:
Normal
Category:
Rules/NAT
Target version:
Start date:
02/22/2017
Due date:
% Done:

0%

Affected version:
All
Affected Architecture:
All

Description

When adding or modifying a firewall rule, the description field accept more characters than are saved, so the description gets truncated.

Associated revisions

Revision adb19456
Added by Jim Pingle 20 days ago

Adjust fix for ticket #7294 for 2.3.x, it used a setHelp change that was only valid on 2.4.

History

#1 Updated by Phillip Davis 29 days ago

firewall_rules_edit.php
strncpy($filterent['descr'], $_POST['descr'], 52);

I wonder why it limits that to 52?
One char per week of the year :)

I will guess that the description is later passed somewhere into the pf ruleset maybe, so it can appear somewhere in logs...?

#2 Updated by Jim Pingle 29 days ago

  • Category set to Rules/NAT
  • Target version set to 2.4.0
  • Affected version set to All
  • Affected Architecture set to All

That's a pf limitation. We prefix user rules with "USER_RULE: " (11 chars) then the description and the total length of the description (including the prefix) has to be 63 or under. See https://github.com/pfsense/pfsense/blob/master/src/etc/inc/filter.inc#L122

63-11=52

#4 Updated by Renato Botelho 21 days ago

  • Assignee set to Renato Botelho

Also available in: Atom PDF