Bug 676949 - ipa cert-remove-hold "abc" trigger internal error
Summary: ipa cert-remove-hold "abc" trigger internal error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-server
Version: 2.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-02-12 00:09 UTC by Yi Zhang
Modified: 2015-01-04 23:46 UTC (History)
4 users (show)

Fixed In Version: freeipa-2.1.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-28 09:27:12 UTC


Attachments (Terms of Use)

Description Yi Zhang 2011-02-12 00:09:21 UTC
Description of problem:
test is below:

[yi@works4me ipa-cert]$ ipa cert-remove-hold abc
ipa: ERROR: an internal error has occurred


Version-Release number of selected component (if applicable):freeipa-server-2.0-0.2011020119gitec59e61.fc14.i686


How reproducible: always


Steps to Reproduce:
1.[yi@works4me ipa-cert]$ ipa cert-remove-hold abc
ipa: ERROR: an internal error has occurred


I expect:
[yi@works4me ipa-cert]$ ipa cert-remove-hold 78
  Unrevoked: False
  Error: Record not found


http error_log:

[Fri Feb 11 16:05:25 2011] [error] ipa: DEBUG: raw: cert_remove_hold(u'abc')
[Fri Feb 11 16:05:25 2011] [error] ipa: INFO: cert_remove_hold(u'abc')
[Fri Feb 11 16:05:25 2011] [error] ipa: INFO: IPA: virtual verify certificate remove hold
[Fri Feb 11 16:05:25 2011] [error] ipa: DEBUG: ipaserver.plugins.dogtag.ra.take_certificate_off_hold()
[Fri Feb 11 16:05:25 2011] [error] ipa: ERROR: non-public: ValueError: invalid literal for int() with base 0: 'abc'
[Fri Feb 11 16:05:25 2011] [error] Traceback (most recent call last):
[Fri Feb 11 16:05:25 2011] [error]   File "/usr/lib/python2.7/site-packages/ipaserver/rpcserver.py", line 211, in wsgi_execute
[Fri Feb 11 16:05:25 2011] [error]     result = self.Command[name](*args, **options)
[Fri Feb 11 16:05:25 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 422, in __call__
[Fri Feb 11 16:05:25 2011] [error]     ret = self.run(*args, **options)
[Fri Feb 11 16:05:25 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 728, in run
[Fri Feb 11 16:05:25 2011] [error]     return self.execute(*args, **options)
[Fri Feb 11 16:05:25 2011] [error]   File "/usr/lib/python2.7/site-packages/ipalib/plugins/cert.py", line 535, in execute
[Fri Feb 11 16:05:25 2011] [error]     result=self.Backend.ra.take_certificate_off_hold(serial_number)
[Fri Feb 11 16:05:25 2011] [error]   File "/usr/lib/python2.7/site-packages/ipaserver/plugins/dogtag.py", line 1589, in take_certificate_off_hold
[Fri Feb 11 16:05:25 2011] [error]     serial_number = int(serial_number, 0)
[Fri Feb 11 16:05:25 2011] [error] ValueError: invalid literal for int() with base 0: 'abc'
[Fri Feb 11 16:05:25 2011] [error] ipa: INFO: response: InternalError: an internal error has occurred
[Fri Feb 11 16:05:25 2011] [error] ipa: INFO: Destroyed connection context.ldap2

Comment 1 Jakub Hrozek 2011-02-13 22:43:55 UTC
The plugins should check for a valid Int literal.

https://fedorahosted.org/freeipa/ticket/958

Comment 2 Dmitri Pal 2011-02-23 20:20:18 UTC
master: 36070555d1bd49aa1b25180db982a31dbac694a1


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