Project

General

Profile

Actions

Bug #9099

closed

system_certmanager.php: Empty cert tag can lead to PHP error

Added by Jim Pingle about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Certificates
Target version:
Start date:
11/06/2018
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4.4
Affected Architecture:
All

Description

If the config.xml contains an empty certificate (<cert></cert>) it leads to a PHP error when attempting to add a new certificate:

PHP Warning:  Illegal string offset 'descr' in /usr/local/www/system_certmanager.php on line 947
PHP Fatal error:  Uncaught Error: Cannot use assign-op operators with string offsets in /usr/local/www/system_certmanager.php:947
Stack trace:
#0 {main}
  thrown in /usr/local/www/system_certmanager.php on line 947

It also shows up in the cert list as an incomplete entry (which is somewhat expected since it is not properly defined)

Actions #1

Updated by Jim Pingle about 3 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #2

Updated by Vladimir Lind about 3 years ago

On 2.4.5-DEVELOPMENT (arm) Mon Nov 05 15:36:37 EST 2018 FreeBSD 11.2-RELEASE-p4:

Created a test cert, then opened /cf/conf/config.xml for editing, removed content of the test cert between <cert></cert> tags, saved files changes. Then run
rm /tmp/config.cache in shell, went back to certificate manager and created new certificate - no errors, looks good.

To be sure I am not missing something - I repeated the same steps on 2.4.4 and got the php error in topic description when creating new cert.

Actions #3

Updated by Jim Pingle about 3 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF