lelle1 Absent Member.
Absent Member.
533 views

Find attribute with empty string

Hi,

We have a problem with an empty string exception in access manager Imanager, the error is only thrown once per Imanager session but it does not report which attribute that has the empty string.
Does anybody have a idea howto find attributes that are empty?

Best regards

Lelle
Labels (1)
0 Likes
8 Replies
Knowledge Partner
Knowledge Partner

Re: Find attribute with empty string

You could always use LDAP, but you'd need to know which attribute to
query. It may help if you can limit it to a certain attribute, or even a
certain object, quickly, so you could then export that object or attribute
and see it clearly.

Also, before we spend too much time on this, I would recommend posting the
steps to duplicate, plus the error message exactly, just in case there is
another explanation that is worth pursuing.

You could do this with Apache Directory Studio or something too, but
here's the command line way to search for an attribute named
'attributeName' with a zero-length value:


ldapsearch -x -LLL -D cn=admin,o=novell -W 'attributeName='



--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
Knowledge Partner
Knowledge Partner

Re: Find attribute with empty string

lelle;2496046 wrote:
Hi,

We have a problem with an empty string exception in access manager Imanager, the error is only thrown once per Imanager session but it does not report which attribute that has the empty string.
Does anybody have a idea howto find attributes that are empty?

Best regards

Lelle


Access Manager? or iManager? Which is it?

If you don't know the name of the attribute, do you know what object it is that it is complaining about?
0 Likes
jwilleke Frequent Contributor.
Frequent Contributor.

Re: Find attribute with empty string

Not sure what is being asked either, but this was posted a couple of years ago:

https://stackoverflow.com/a/14457703/88122
0 Likes
Knowledge Partner
Knowledge Partner

Re: Find attribute with empty string

jwilleke;2496120 wrote:
Not sure what is being asked either, but this was posted a couple of years ago:

https://stackoverflow.com/a/14457703/88122


I seem to recall eDirectory allowing "(&(!(manager=*))(manager=*))" to work and return objects with an empty attribute, but haven't tried it recently. Still, you'd need to know which attribute you're looking for, which the OP doesn't seem to have.
0 Likes
johnbaird Absent Member.
Absent Member.

Re: Find attribute with empty string

The schema does not allow zero length strings as values for most attributes holding text. But it does for "Full Name" which has a length range of 0-127. Likewise for "Postal Code" and "Postal Office Box" which have ranges 0-40. "Full name" seems the likely candidate here.

John
0 Likes
jwilleke Frequent Contributor.
Frequent Contributor.

Re: Find attribute with empty string

I think what many people run into are a <space> which is to us mere humans "empty".
I have see people fill out Web front ends to eDirectory and they tend to put a space in what probably should be an empty field which then that space gets put into LDAP.

-jim
0 Likes
Knowledge Partner
Knowledge Partner

Re: Find attribute with empty string

On 03/04/2019 02:54 AM, jwilleke wrote:
>
> I think what many people run into are a <space> which is to us mere
> humans "empty".
> I have see people fill out Web front ends to eDirectory and they tend to
> put a space in what probably should be an empty field which then that
> space gets put into LDAP.


Agreed. This (to me) is a failure on the web frontend and backend side,
as those kinds of things should be detected and handled accordingly.
Similarly, I've seen, specifically with fullName, code which takes
givenname and sn (Surname) and throws them together with a space in
between regardless of the validity of the givenName and sn values, though
at least in eDirectory's case the sn itself is mandatory on a User object,
but somehow this kind of thing still happens. Testing for bad user input
data is a problem in IT generally, though.

Considering NAM's ability to provision users during federation from
another source, the problem could even come from there; the user is
mis-created in another environment, then NAM populates its own user store
with data derived from the SAML2 data and that is not handled properly.

--
Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.
0 Likes
jwilleke Frequent Contributor.
Frequent Contributor.

Re: Find attribute with empty string

Of course it "is a failure on the web frontend and backend side", but then again we could not control that part of it.

So on the driver from the Database fed by that web frontend, we started parsing that data on the driver input and when possible removing erroneous spaces (leading and trailing) when only a "space" existed as a value, dropping the attribute.

Then to cleaning the data...
We were able find some using for leading spaces (attribute=\20*)

I know no method to find trailing spaces as (attribute=*\20) finds any value with a space anywhere (On implementations I tested except beginning)

And these only wok on values that are support substring match rule.

-jim
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.