Project

General

Profile

Actions

Bug #7294

closed

Lenght of description of firewall rules

Added by Pablo Trincavelli almost 8 years ago. Updated over 7 years ago.

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

0%

Estimated time:
Plus Target Version:
Release Notes:
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.

Actions #1

Updated by Phillip Davis almost 8 years 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...?

Actions #2

Updated by Jim Pingle almost 8 years ago

  • Category set to Rules / NAT
  • Target version set to 2.4.0
  • Affected Version set to All
  • Affected Architecture All added
  • Affected Architecture deleted ()

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

Actions #4

Updated by Renato Botelho almost 8 years ago

  • Assignee set to Renato Botelho
Actions #5

Updated by Jim Pingle over 7 years ago

  • Status changed from New to Resolved
  • Target version changed from 2.4.0 to 2.3.4

PR was merged and it has been working

Actions

Also available in: Atom PDF