Skip to content

Commit

Permalink
Update pfBlocker cURL defaults for PHP 8.x. Issue #13926
Browse files Browse the repository at this point in the history
  • Loading branch information
jim-p committed Feb 3, 2023
1 parent af6529f commit a1d2d7f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion net/pfSense-pkg-pfBlockerNG-devel/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PORTNAME= pfSense-pkg-pfBlockerNG-devel
PORTVERSION= 3.2.0
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ $pfb['curl_defaults'] = array( CURLOPT_USERAGENT => 'pfSense/pfBlockerNG cURL d
CURLOPT_FRESH_CONNECT => true,
CURLOPT_FILETIME => true,
CURLOPT_TCP_NODELAY => true,
CURLOPT_CONNECTTIMEOUT => 15
CURLOPT_CONNECTTIMEOUT => 15,
CURLOPT_AUTOREFERER => true,
CURLOPT_MAXREDIRS => 10,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_NONE,
CURLOPT_FORBID_REUSE => true,
CURLOPT_SSL_ENABLE_ALPN => true,
CURLOPT_SSL_ENABLE_NPN => true,
);

// RFC7231 HTTP response codes
Expand Down
2 changes: 1 addition & 1 deletion net/pfSense-pkg-pfBlockerNG/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PORTNAME= pfSense-pkg-pfBlockerNG
PORTVERSION= 3.2.0
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,13 @@ $pfb['curl_defaults'] = array( CURLOPT_USERAGENT => 'pfSense/pfBlockerNG cURL d
CURLOPT_FRESH_CONNECT => true,
CURLOPT_FILETIME => true,
CURLOPT_TCP_NODELAY => true,
CURLOPT_CONNECTTIMEOUT => 15
CURLOPT_CONNECTTIMEOUT => 15,
CURLOPT_AUTOREFERER => true,
CURLOPT_MAXREDIRS => 10,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_NONE,
CURLOPT_FORBID_REUSE => true,
CURLOPT_SSL_ENABLE_ALPN => true,
CURLOPT_SSL_ENABLE_NPN => true,
);

// RFC7231 HTTP response codes
Expand Down

1 comment on commit a1d2d7f

@mikko70
Copy link

@mikko70 mikko70 commented on a1d2d7f Feb 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pfBlockerNG ( and devel) 3.2.0_1 with PFsense 23.01.r.20230207.0600,
cause PHP error when try install. Reinstall or remove and reinstall not help anything.

PHP errors
PHP ERROR: Type: 1, File: /usr/local/www/pfblockerng/pfblockerng.php, Line: 1980, Message: Uncaught TypeError: sort(): Argument #1 ($array) must be of type array, null given in /usr/local/www/pfblockerng/pfblockerng.php:1980
Stack trace:
#0 /usr/local/www/pfblockerng/pfblockerng.php(1980): sort(NULL, 2)
#1 /usr/local/pkg/pfblockerng/pfblockerng_install.inc(40): pfblockerng_get_countries()
#2 /etc/inc/pkg-utils.inc(781) : eval()'d code(1): include_once('/usr/local/pkg/...')
#3 /etc/inc/pkg-utils.inc(781): eval()
#4 /etc/inc/pkg-utils.inc(899): eval_once('include_once('/...')
#5 /etc/rc.packages(76): install_package_xml('pfBlockerNG')
#6 {main}
thrown @ 2023-02-07 14:39:25

edit:
Complete pfsense reinstall fix problem, pfblockerng install and remove not fixed it.

Please sign in to comment.