Bug 1691473 - ACI accepts invalid syntax
Summary: ACI accepts invalid syntax
Keywords:
Status: CLOSED DUPLICATE of bug 1590305
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: 389-ds-base
Version: 8.0
Hardware: All
OS: All
low
medium
Target Milestone: rc
: 8.0
Assignee: mreynolds
QA Contact: RHDS QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-21 17:00 UTC by Anuj Borah
Modified: 2020-02-27 11:20 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-27 11:20:44 UTC
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Anuj Borah 2019-03-21 17:00:10 UTC
Description of problem:

ACI accepts invalid syntax. ACI accepts all of the bellow aci's with wrong syntax.


tests = [
         ('test_targattrfilters_18', f'(target = ldap:///cn=Jeff Vedder,ou=Product Development,{DEFAULT_SUFFIX})(targetattr=*)(version 3.0; acl "Name of the ACI";  deny(write)userdn="ldap:///{"123" * 300}";)'),
         ('test_targattrfilters_20', f'(target = ldap:///cn=Jeff Vedder,ou=Product Development,{DEFAULT_SUFFIX})(targetattr=*)(version 3.0; acl "Name of the ACI";  deny(write)userdns="ldap:///anyone";)'),
         ('test_bind_rule_set_with_more_than_three', f'(target = ldap:///{DEFAULT_SUFFIX})(targetattr=*)(version 3.0; acl "Name of the ACI"; deny absolute (all)userdn="ldap:////////anyone";)'),
         ('test_Use_double_equal_instead_of_equal_in_the_targetattr', f'(target = ldap:///{DEFAULT_SUFFIX})(targetattr==*)(version 3.0; acl "Name of the ACI"; deny absolute (all)userdn="ldap:///anyone";)'),
         ]


@pytest.mark.parametrize("realvalue", [a[1] for a in tests], ids=[a[0] for a in tests])
def test_aci_invalid_syntax(topo, realvalue):
    domain = Domain(topo.standalone, DEFAULT_SUFFIX)
    with pytest.raises(ldap.INVALID_SYNTAX):
        domain.add("aci", realvalue)


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


How reproducible:

Always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anuj Borah 2019-03-21 17:13:38 UTC
Bellow are the reasons for these failure: 

for first aci:  userdn="ldap:///{"123" * 300}";)
for second aci: userdns="ldap:///anyone";) 
for third aci: userdn="ldap:////////anyone";)
for fourth aci : targetattr==*

Comment 2 Viktor Ashirov 2020-02-27 11:20:44 UTC

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


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