Bug 510735

Summary: ipa pwpolicy minlength: Need to define and enforce acceptable data ranges
Product: [Retired] freeIPA Reporter: Jenny Severance <jgalipea>
Component: ipa-admintoolsAssignee: Rob Crittenden <rcritten>
Status: CLOSED DUPLICATE QA Contact: Chandrasekar Kannan <ckannan>
Severity: medium Docs Contact:
Priority: high    
Version: 2.0CC: benl, dpal, jgalipea, pzuna
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-11-23 13:16:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jenny Severance 2009-07-10 14:15:50 UTC
Description of problem:

Right now there is no defined or enforce data ranges for minlength.  You can
define the minimum password length with positive integers up to
299999999.  This is unrealistic.

[root@jennyv2 ~]# ipa pwpolicy-mod --minlength=3000000000
ipa: ERROR: non-public: TypeError: value: need a <type 'int'>; got 3000000000L (a <type 'long'>)
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/ipalib/backend.py", line 110, in execute
    result = self.Command[_name](*args, **options)
  File "/usr/lib/python2.4/site-packages/ipalib/plugable.py", line 410, in __call__
    return self['__call__'](*args, **kw)
  File "/usr/lib/python2.4/site-packages/ipalib/frontend.py", line 396, in __call__
    self.validate(**params)
  File "/usr/lib/python2.4/site-packages/ipalib/frontend.py", line 583, in validate
    param.validate(value)
  File "/usr/lib/python2.4/site-packages/ipalib/parameters.py", line 622, in validate
    self._validate_scalar(value)
  File "/usr/lib/python2.4/site-packages/ipalib/parameters.py", line 630, in _validate_scalar
    raise TypeError(
TypeError: value: need a <type 'int'>; got 3000000000L (a <type 'long'>)
ipa: ERROR: an internal error has occurred

[root@jennyv2 ~]# ipa pwpolicy-mod --minlength=299999999
-------------
pwpolicy-mod:
-------------
Password policy:
  Minimum length: 299999999
-------------------------
Modified password policy.




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

How reproducible:
always

Steps to Reproduce:
1. see description examples
2.
3.
  
Actual results:
internal error when minlength is defined over 299999999
values up to 299999999 are accepted

Expected results:
Proper error message and no traceback
only values up to realistic minimum password length are accepted i.e...


Additional info:

Comment 1 Pavel Zuna 2009-11-23 13:16:33 UTC

*** This bug has been marked as a duplicate of bug 510740 ***