Bug 570905 - postalAddress syntax should allow empty lines (should allow $$)
Summary: postalAddress syntax should allow empty lines (should allow $$)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: 389
Classification: Retired
Component: Schema
Version: 1.2.6
Hardware: All
OS: Linux
low
urgent
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Viktor Ashirov
URL:
Whiteboard:
Depends On:
Blocks: 434914 389_1.2.6
TreeView+ depends on / blocked
 
Reported: 2010-03-05 20:17 UTC by Anthony Messina
Modified: 2015-12-07 16:59 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-07 16:59:15 UTC
Embargoed:


Attachments (Terms of Use)
patch (2.46 KB, patch)
2010-03-08 22:18 UTC, Rich Megginson
nhosoi: review+
Details | Diff

Description Anthony Messina 2010-03-05 20:17:13 UTC
Using version 1.2.5 (Build 2010.012.2035) with "Schema Checking" enabled, I 
can have:

postalAddress: $, $$$

Using version 1.2.6.a2 (Build 2010.061.2025) with "Schema Checking" enabled, I 
am not able to use the above syntax for postalAddress.

In an email discussion with Rich, it appears as though RFC 2252 allows this, whereas RFC 4517 does not.

This difference breaks eGroupWare's addressbook (adnd possibly many other CMS) handling of the postalAddress, homePostalAddress, etc. attributes.

The issue is with "partial addresses", where you may not have every part of the address defined for entry into LDAP:

For example, take the following address:

123 4th ST
ANYTOWN IL 60611
USA

What if I wanted to have a contact for which I only knew the postal code and 
country.  Is it "illegal" to have the following in postalAddress?

postalAddress: $, $60611$$USA


The fact that "this has always worked" with OpenLDAP and previous versions 
(1.2.5) of 389 DS is irrelevant, I agree. But it seems like the description 
for 1.3.6.1.4.1.1466.115.121.1.41 doesn't prohibit that format.  It appears to 
me (the non-expert) as though the "$" character simply acts as a line 
terminator/carriage return.

Me:
> Is it "illegal" to have the following in postalAddress?
>
> postalAddress: $, $60611$$USA
>  

Rich: 
According to RFC 4517, yes, but according to RFC 2252, technically no.

Comment 1 Rich Megginson 2010-03-05 20:27:19 UTC
I think the right thing to do is to allow $$, and optionally make it configurable.

Comment 2 Rich Megginson 2010-03-08 22:18:12 UTC
Created attachment 398636 [details]
patch

Comment 3 Rich Megginson 2010-03-08 23:28:28 UTC
To ssh://git.fedorahosted.org/git/389/ds.git
   4845ffc..b8ff06d  master -> master

commit b8ff06dd240df947fee972fe13bb2826ebb02048
Author: Rich Megginson <rmeggins>
Date:   Mon Mar 8 14:35:17 2010 -0700
    Reviewed by: nhosoi (Thanks!)
    Branch: HEAD
    Fix Description: Even though RFC 4517 says a postal address syntax value
    should not contain empty lines (e.g. $$), most, if not all, current
    applications expect to be able to store $$.  This adds an internal switch
    to allow support for $$ for now.
    Platforms tested: RHEL5 x86_64
    Flag Day: no
    Doc impact: no

To ssh://git.fedorahosted.org/git/389/ds.git
   73a7424..5962d96  Directory_Server_8_2_Branch -> Directory_Server_8_2_Branch
commit 5962d965030a70a1cbf31081ed92d5f933e89c00
Author: Rich Megginson <rmeggins>
Date:   Mon Mar 8 14:35:17 2010 -0700
    Reviewed by: nhosoi (Thanks!)
    Branch: Directory_Server_8_2_Branch
    Fix Description: Even though RFC 4517 says a postal address syntax value
    should not contain empty lines (e.g. $$), most, if not all, current
    applications expect to be able to store $$.  This adds an internal switch
    to allow support for $$ for now.
    Platforms tested: RHEL5 x86_64
    Flag Day: no
    Doc impact: no
    (cherry picked from commit b8ff06dd240df947fee972fe13bb2826ebb02048)

Comment 4 Jenny Severance 2010-06-07 16:41:14 UTC
verified - RHEL 4

version:
redhat-ds-base-8.2.0-2010060704.el4dsrv

1. turned on syntax checking
# ldapsearch -x -h `hostname` -p 389 -D "cn=Directory Manager" -w Secret123 -b "cn=config" | grep syntaxcheck
nsslapd-syntaxcheck: on

2. Added user with postalAddress as defined in comment 1 successfully

ldapsearch -x -h `hostname` -p 389 -D "cn=Directory Manager" -w Secret123 -b "uid=test,ou=people,dc=example,dc=com" "(objectclass=*)"
# extended LDIF
#
# LDAPv3
# base <uid=test,ou=people,dc=example,dc=com> with scope sub
# filter: (objectclass=*)
# requesting: ALL
#

# test, People, example.com
dn: uid=test,ou=People,dc=example,dc=com
uid: test
givenName: test
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetorgperson
postalAddress: $, $60611$$USA
sn: test
cn: test test
userPassword:: e1NTSEF9T1B3T211YU5mYWZXSFBweHlOcWl4ZkpwWmlGeEJveDJyc1NFWVE9PQ=
 =

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

Comment 5 Anthony Messina 2011-07-02 18:16:01 UTC
I believe this is fixed and can be closed.  Thank you.


Note You need to log in before you can comment on or make changes to this bug.