Project

General

Profile

Actions

Regression #13831

closed

Syntax error in /etc/inc/util.inc on line 3655

Added by Steve Wheeler almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Upgrade
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.01
Release Notes:
Force Exclusion
Affected Version:
2.7.0
Affected Architecture:

Description

When upgrading from 22.05 to 23.01 with a specific config:

Parse error: syntax error, unexpected ')', expecting '|' or variable (T_VARIABLE) in /etc/inc/util.inc on line 3655

There appears to be a similar error on line 3728:

$ git grep -n 'catch.*Exception)'
src/etc/inc/util.inc:3655:                      } catch(Exception) {
src/etc/inc/util.inc:3728:                      } catch(Exception) {

Tested: 23.01.b.20230104.0600

Actions #1

Updated by Jim Pingle almost 2 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Jim Pingle almost 2 years ago

  • Project changed from pfSense Plus to pfSense
  • Category changed from Upgrade to Upgrade
  • Target version changed from 23.01 to 2.7.0
  • Affected Plus Version deleted (23.01)
  • Plus Target Version set to 23.01
  • Affected Version set to 2.7.0

This isn't plus specific, it was just noticed there first.

This would happen only if an invalid Cisco ACL rule is received during RADIUS auth (e.g. for OpenVPN users), the catch statement was changed when cleaning up unused variables recently but in this case it's required even if unused. Also the error messages involved need some cleanup.

Actions #3

Updated by Jim Pingle almost 2 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 0 to 100
Actions #4

Updated by Jim Pingle almost 2 years ago

  • Status changed from Feedback to Resolved

With a properly formatted ACL sent from RADIUS, the rule is accepted and present in the ruleset.

With a deliberately broken ACL sent from RADIUS, the rule is rejected and the (new) correct error is logged:

Jan  5 09:59:03 rose openvpn[750]: Error parsing rule permit ip 10.3.202.0 24 host 10.3.0.1: Invalid source netmask '24' (Value is not in dotted quad notation.).

There is no PHP error and the code is now working as it should, so this can be closed.

Actions #5

Updated by Jim Pingle almost 2 years ago

  • Release Notes changed from Default to Force Exclusion
Actions

Also available in: Atom PDF