<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.pygments-n
        {mso-style-name:pygments-n;}
span.pygments-o
        {mso-style-name:pygments-o;}
span.pygments-ow
        {mso-style-name:pygments-ow;}
span.pygments-p
        {mso-style-name:pygments-p;}
span.pygments-k
        {mso-style-name:pygments-k;}
span.pygments-ne
        {mso-style-name:pygments-ne;}
span.pygments-s
        {mso-style-name:pygments-s;}
span.pygments-si
        {mso-style-name:pygments-si;}
span.pygments-nb
        {mso-style-name:pygments-nb;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1027" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hello there,<o:p></o:p></p>
<p class="MsoNormal">Would anybody be willing  to help me with getting to the bottom of this?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’ve set up LDAP for some webapp, and I get this error:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">LDAP Auth error: Received unexpected critical response control with controlType '2.16.840.1.113730.3.4.5'<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m using python-ldap-2.4.14, and it gets thrown for accounts that get the warning about the accounts that have a password expiration in a few days.<o:p></o:p></p>
<p class="MsoNormal">Searching through the code, I figured that the handling should happen in Lib/ldap/controls/pwdpolicy.py since that’s where the OID is defined.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The error is generated in<o:p></o:p></p>
<p class="MsoNormal">Lib/ldap/controls/__init__.py<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">136           knownLDAPControls = knownLDAPControls or KNOWN_RESPONSE_CONTROLS<o:p></o:p></p>
<p class="MsoNormal">137           result = []<o:p></o:p></p>
<p class="MsoNormal">138           for controlType,criticality,encodedControlValue in ldapControlTuples or []:<o:p></o:p></p>
<p class="MsoNormal">139             try:<o:p></o:p></p>
<p class="MsoNormal">140               control = knownLDAPControls[controlType]()<o:p></o:p></p>
<p class="MsoNormal">141             except KeyError:<o:p></o:p></p>
<p class="MsoNormal">142               if criticality:<o:p></o:p></p>
<p class="MsoNormal">143                 raise ldap.UNAVAILABLE_CRITICAL_EXTENSION('Received unexpected critical response control with controlType %s' % (repr(controlType)))<o:p></o:p></p>
<p class="MsoNormal">144             else:<o:p></o:p></p>
<p class="MsoNormal">145               control.controlType,control.criticality = controlType,criticality<o:p></o:p></p>
<p class="MsoNormal">146               try:<o:p></o:p></p>
<p class="MsoNormal">147                 control.decodeControlValue(encodedControlValue)<o:p></o:p></p>
<p class="MsoNormal">148               except PyAsn1Error,e:<o:p></o:p></p>
<p class="MsoNormal">149                 if criticality:<o:p></o:p></p>
<p class="MsoNormal">150                   raise e<o:p></o:p></p>
<p class="MsoNormal">151               else:<o:p></o:p></p>
<p class="MsoNormal">152                 result.append(control)<o:p></o:p></p>
<p class="MsoNormal">153           return result<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In my case I tried to get some more info through printing out more values in the exception:<o:p></o:p></p>
<p class="MsoNormal">criticality =-1, <o:p></o:p></p>
<p class="MsoNormal">encodedControlValue = 410453,<br>
repr(controlType) = 2.16.840.1.113730.3.4.5<o:p></o:p></p>
<p class="MsoNormal">also, I tried to get value of control, but got:<br>
LDAP Auth error: local variable 'control' referenced before assignment<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks in advance,<o:p></o:p></p>
<p class="MsoNormal">Adam Polkosnik<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>


<BR>
<html>

<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<meta name=Generator content="Microsoft Word 12 (filtered)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin-top:0in;
        margin-right:0in;
        margin-bottom:10.0pt;
        margin-left:0in;
        line-height:115%;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
.MsoPapDefault
        {margin-bottom:10.0pt;
        line-height:115%;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US>

<div class=Section1>

<p class=MsoNormal> </p>

<p class=MsoNormal> </p>

<p class=MsoNormal>This e-mail message, including attachments, is for the sole
use of the intended recipient(s) and may contain confidential or proprietary
information.  If you are not the intended recipient, immediately contact the
sender by reply e-mail and destroy all copies of the original message.</p>

</div>

</body>

</html>