Project

General

Profile

Bug #9099

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

Added by Jim Pingle over 2 years ago. Updated over 2 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:
Default
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)

Associated revisions

Revision ca4456b9 (diff)
Added by Jim Pingle over 2 years ago

Improve handling of empty cert tags. Fixes #9099

Revision 04e1a5d3 (diff)
Added by Jim Pingle over 2 years ago

Improve handling of empty cert tags. Fixes #9099

(cherry picked from commit ca4456b95c53e89cf6b428a999ae15367b753073)

History

#1 Updated by Jim Pingle over 2 years ago

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

#2 Updated by Vladimir Lind over 2 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.

#3 Updated by Jim Pingle over 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF