Project

General

Profile

Actions

Bug #14013

closed

PHP error when attempting to bulk import Alias content

Added by Amin Sadeghi about 1 year ago. Updated 11 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Aliases / Tables
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.05
Release Notes:
Default
Affected Version:
2.7.0
Affected Architecture:
amd64

Description

Fatal error: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_aliases_import.php:88 Stack trace: #0 {main} thrown in /usr/local/www/firewall_aliases_import.php on line 88 PHP ERROR: Type: 1, File: /usr/local/www/firewall_aliases_import.php, Line: 88, Message: Uncaught TypeError: Cannot access offset of type string on string in /usr/local/www/firewall_aliases_import.php:88 Stack trace: #0 {main} thrown


Files

PHP_errors.log (257 Bytes) PHP_errors.log Amin Sadeghi, 02/22/2023 10:25 AM
firewall_aliases_import.php (8.41 KB) firewall_aliases_import.php Amin Sadeghi, 02/23/2023 06:10 AM
Actions #1

Updated by Jim Pingle about 1 year ago

  • Project changed from pfSense Plus to pfSense
  • Category changed from Aliases / Tables to Aliases / Tables
  • Status changed from New to Confirmed
  • Assignee set to Jim Pingle
  • Priority changed from High to Normal
  • Target version set to 2.7.0
  • Affected Plus Version deleted (23.01)
  • Plus Target Version set to 23.05
Actions #2

Updated by Jim Pingle about 1 year ago

  • Subject changed from IP aliases Bulk import php error line 88 to PHP error when attempting to bulk import Alias content
Actions #3

Updated by Jim Pingle about 1 year ago

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

Updated by Danilo Zrenjanin about 1 year ago

I couldn't reproduce this issue.

I tried with bulk import, but I couldn't replicate that issue on a stock 23.01 install.

Can you please provide an export file with content that will break it upon import task?

Actions #5

Updated by Amin Sadeghi about 1 year ago

Danilo Zrenjanin wrote in #note-4:

I couldn't reproduce this issue.

I tried with bulk import, but I couldn't replicate that issue on a stock 23.01 install.

Can you please provide an export file with content that will break it upon import task?

Hello, thank you for your reply. I have a problem in the bulk import section, even when I enter only one IP address, the system shows me an error.
Of course, before your post, Jim Pingle about sent me a solution to this problem that I haven't tried yet.

my firewall_aliases_import.php is attached. thank you

Actions #6

Updated by Jim Pingle about 1 year ago

I was able to easily replicate it on an install that was very close to a default config. The error happened on a line processing interface groups, if none are present in the config then it would fail there.

Actions #7

Updated by Amin Sadeghi about 1 year ago

Jim Pingle wrote in #note-3:

Applied in changeset 290b3461bb816e9fc161568e499d43b24542cb9f.

i test your code. error fixed with your code change
god bless you Jim

Actions #8

Updated by Danilo Zrenjanin about 1 year ago

  • Status changed from Feedback to Resolved

It works fine if I import a list under Firewall/Aliases/IP

I could replicate the issue only after choosing Firewall/Aliases/All, then importing.

However, the patch fixes it.

I am marking this ticket reslvoed.

Actions #9

Updated by Jim Pingle 11 months ago

  • Affected Version set to 2.7.0
Actions

Also available in: Atom PDF