Project

General

Profile

Actions

Bug #9099

closed
JP JP

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

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

Added by Jim Pingle almost 8 years ago. Updated almost 8 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)

JP Updated by Jim Pingle almost 8 years ago Actions #1

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Applied in changeset commit:ca4456b95c53e89cf6b428a999ae15367b753073.

VL Updated by Vladimir Lind almost 8 years ago Actions #2

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.

JP Updated by Jim Pingle almost 8 years ago Actions #3

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom