[Zope] Logic-defying bug with LDAP method

Dennis Moore rainking@feeding.frenzy.com
Wed, 2 Feb 2000 20:16:17 -0600


I've got an LDAP method called 'getuser' which simply returns all the
information for a particular userid.  This part seems to work ok.  I am
having a really weird problem with trying to use the information I get from
it, though:

<dtml-call "REQUEST.set('userid', 'someone')">

<dtml-in getuser>
<dtml-call "REQUEST.set('foo', departmentnumber)">
</dtml-in>

<dtml-if  "foo == 'RU168'">
	match!
<dtml-else>
	foo .<dtml-var foo>.
<p><dtml-var REQUEST>
</dtml-if>

This prints:
foo .RU168.

So foo is RU168, but the conditional still fails for some reason.  Now, if
I do virtually the same thing with an SQL method, it works fine (prints
"match!").  I can get the results, print them, and compare them.  The weird
behavior only happens with the data from an LDAP method.

I've tried with the conditional inside the dtml-in.  I've tried comparing
departmentnumber instead of foo.  Always the same result.  Printing
<dtml-var departmentnumber> gives me RU168.  

Can anyone shed some light on this or offer some debugging hints?

Thanks

-- 
<BLINK> ;for (74,1970500640,1634627444,1751478816,1348825708,543711587,
1801810465){for($x=1<<1^1;$x>=1>>1;$x--) {$q=hex ff,$r=oct($x=~s,\d,$&*
10,e,$x),$x/=1/.1,$q<<=$r,$s.=chr (($_&$q)>>$r),$t++}}while($= ||= !$|)
{$o=$o?$?:$/;$|=1;print $o?$s:$"x$t if$;;print"\b"x$t;sleep 1} </BLINK>