RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1791666 - PKI parameter -P with null value i.e '' should generate use friendly exception like nullpointer exception instead Traceback error
Summary: PKI parameter -P with null value i.e '' should generate use friendly exceptio...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pki-core
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.0
Assignee: RHCS Maintainers
QA Contact: PKI QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-16 10:46 UTC by Pritam Singh
Modified: 2020-10-04 21:46 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-03 18:25:17 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Pagure dogtagpki issue 3128 0 None None None 2020-03-03 20:19:44 UTC
Github dogtagpki pki issues 3245 0 None open Calling pki with empty protocol should generate user-friendly message 2021-01-31 15:34:32 UTC

Description Pritam Singh 2020-01-16 10:46:15 UTC
Description of problem:
pki parameter -P with null value i.e '' should generate user-friendly exception like null pointer exception instead Traceback error

Failure Param:
pki parameter -P with null value i.e -P ''

Command 1:
[root@pki1 ~]# pki -d /root/nssdb/ -c SECret.123 -P 'http' -p 20080 -n "PKI CA Administrator for Example.Org" ca
Commands:
 ca-authority                      CA management commands
 ca-audit                          Audit management commands
 ca-cert                           Certificate management commands
 ca-feature                        Feature management commands
 ca-group                          Group management commands
 ca-kraconnector                   KRA Connector management commands
 ca-profile                        Profile management commands
 ca-selftest                       Selftest management commands
 ca-user                           User management commands

Command 2:
[root@pki1 ~]# pki -d /root/nssdb/ -c SECret.123 -P '' -p 20080 -n "PKI CA Administrator for Example.Org" ca
Traceback (most recent call last):
  File "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.6/site-packages/pki/cli/main.py", line 255, in <module>
    cli.execute(sys.argv)
  File "/usr/lib/python3.6/site-packages/pki/cli/main.py", line 161, in execute
    if args[i][0] != '-':
IndexError: string index out of range

Version-Release number of selected component (if applicable):

[root@pki1 ~]# rpm -qi pki-ca
Name        : pki-ca
Version     : 10.8.0
Release     : 0.4.module+el8.2.0+5228+a2bc7b32
Architecture: noarch
Install Date: Fri 10 Jan 2020 10:53:42 PM IST
Group       : Unspecified
Size        : 2466776
License     : GPLv2 and LGPLv2
Signature   : RSA/SHA256, Sat 14 Dec 2019 02:59:02 AM IST, Key ID 199e2f91fd431d51
Source RPM  : pki-core-10.8.0-0.4.module+el8.2.0+5228+a2bc7b32.src.rpm
Build Date  : Sat 14 Dec 2019 12:26:29 AM IST
Build Host  : arm64-036.build.eng.bos.redhat.com
Relocations : (not relocatable)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Vendor      : Red Hat, Inc.
URL         : http://www.dogtagpki.org/
Summary     : PKI CA Package


How reproducible:
Very

Steps to Reproduce:
1. See Description Section

Actual results:
It is generating Traceback error

Expected results:
if -P is null i.e -P '' It should throw a null exception

Additional info:

Comment 1 Endi Sukma Dewata 2020-03-03 18:25:17 UTC
This issue will be addressed upstream:
https://pagure.io/dogtagpki/issue/3128


Note You need to log in before you can comment on or make changes to this bug.