Skip to content

Fix parsing of PPolicyControl ASN.1 structure#194

Merged
encukou merged 1 commit into
python-ldap:masterfrom
tiran:ppolicycontrol
Mar 27, 2018
Merged

Fix parsing of PPolicyControl ASN.1 structure#194
encukou merged 1 commit into
python-ldap:masterfrom
tiran:ppolicycontrol

Conversation

@tiran

@tiran tiran commented Mar 23, 2018

Copy link
Copy Markdown
Member

Password policy control decoder failed to handle graceAuthNsRemaining
correctly. The warning.getComponentByName('timeBeforeExpiration') call
materialized the time before expiration CHOICE element. The fixed
implementation uses pyasn1's dict interface to check which CHOICE
element is set.

Closes: #192
See: #193
Signed-off-by: Christian Heimes cheimes@redhat.com

Password policy control decoder failed to handle graceAuthNsRemaining
correctly. The warning.getComponentByName('timeBeforeExpiration') call
materialized the time before expiration CHOICE element. The fixed
implementation uses pyasn1's dict interface to check which CHOICE
element is set.

Closes: python-ldap#192
See: python-ldap#193
Signed-off-by: Christian Heimes <cheimes@redhat.com>
@codecov

codecov Bot commented Mar 23, 2018

Copy link
Copy Markdown

Codecov Report

Merging #194 into master will increase coverage by 0.26%.
The diff coverage is 90%.

@@            Coverage Diff             @@
##           master     #194      +/-   ##
==========================================
+ Coverage   70.25%   70.51%   +0.26%     
==========================================
  Files          49       49              
  Lines        4811     4806       -5     
  Branches      810      810              
==========================================
+ Hits         3380     3389       +9     
+ Misses       1098     1082      -16     
- Partials      333      335       +2
Impacted Files Coverage Δ
Lib/ldap/controls/ppolicy.py 90.32% <90%> (+37.54%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fd0ec90...b1e8439. Read the comment docs.

@droideck

Copy link
Copy Markdown
Contributor

The code looks good to me and it has fixed the issue we had.

@encukou encukou merged commit 4a6a719 into python-ldap:master Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PasswordPolicyControl.graceAuthNsRemaining falsely returns None

3 participants