<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
John,<br>
<br>
I have just fixed that bug. It will be included in the next release.<br>
Setting those attributes to '' now has the same effect as not
setting them at all.<br>
So now you don't need to fight with 'upgrade' any more (hopefully!).<br>
<br>
Cheers,<br>
Jules.<br>
<br>
<div class="moz-cite-prefix">On 23/07/2020 17:54, John Thurston via
ZendTo wrote:<br>
</div>
<blockquote type="cite"
cite="mid:WM!2612535d3274ab75de47001c2fafa283d5094730243720e1accc5ab3d4466881bb619f7ffd750588f87b9ef8b5d8e0c9!@mx.jul.es"><br>
On 7/23/2020 3:51 AM, Jules wrote:
<br>
<blockquote type="cite">John,
<br>
<br>
Please don't comment out settings you don't want to specify
(such as the service account credentials, etc). Just leave them
set to an empty string. Then 'upgrade' will be happy.
<br>
</blockquote>
<br>
As mentioned in my original note, "I tried setting each of these
to null strings, hoping that might trigger the code to ignore the
values and also let the upgrade script leave them unchanged.
Bzzzt. I couldn't authenticate. "
<br>
<br>
But taking your advice, I tried it again...and got the same
result. So went to my ldap logs to see what queries were being
performed, and dug in the code to see how the settings are being
used. The crux of the problem is an empty string does not result
in the same behavior as an undefined value.
<br>
<br>
The LDAP authenticator works perfectly for us with those settings
_undefined_. But, if defined, the value of 'authLDAPUsernameAttr'
and 'authLDAPEmailAttr' must _not be empty strings_. If they are
undefined, the code in NSSLDAPAuthenticator.php assumes reasonable
values for those two settings:
<br>
<br>
protected $_ldapUNA = 'uid';
<br>
protected $_ldapEMA = 'mail';
<br>
<br>
which happened to align perfectly well with our directory.
<br>
<br>
<br>
<br>
I will uncomment those attributes in preferences. That will make
the upgrade script happy.
<br>
<br>
I will leave the default values for those two attributes, and set
the other string values to empty. That will make authentication
work.
<br>
<br>
And with those steps, I think my future version upgrades will be
much easier!
<br>
<br>
<br>
I will also report a bug:
<br>
The upgrade script requires the presence of at least two
attributes in preferences.php, which the LDAP authentication code
treats as optional.
<br>
<br>
<br>
--
<br>
Do things because you should, not just because you can.
<br>
<br>
John Thurston 907-465-8591
<br>
<a class="moz-txt-link-abbreviated" href="mailto:John.Thurston@alaska.gov">John.Thurston@alaska.gov</a>
<br>
Department of Administration
<br>
State of Alaska
<br>
<br>
_______________________________________________
<br>
ZendTo mailing list
<br>
<a class="moz-txt-link-abbreviated" href="mailto:ZendTo@zend.to">ZendTo@zend.to</a>
<br>
<a class="moz-txt-link-freetext" href="http://jul.es/mailman/listinfo/zendto">http://jul.es/mailman/listinfo/zendto</a>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">Jules
--
Julian Field MEng CEng CITP MBCS MIEEE MACM
'A committee is a group of the unwilling, chosen from the unfit,
to do the unnecessary.' - Anon
<a class="moz-txt-link-abbreviated" href="http://www.Zend.To">www.Zend.To</a>
Twitter: @JulesFM
</pre>
</body>
</html>