Bug 510735 - ipa pwpolicy minlength: Need to define and enforce acceptable data ranges
Summary: ipa pwpolicy minlength: Need to define and enforce acceptable data ranges
Keywords:
Status: CLOSED DUPLICATE of bug 510740
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-admintools
Version: 2.0
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-07-10 14:15 UTC by Jenny Severance
Modified: 2015-01-04 23:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-23 13:16:33 UTC
Embargoed:


Attachments (Terms of Use)

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 ***


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