diff options
author | Endi S. Dewata <edewata@redhat.com> | 2016-08-12 23:06:24 +0200 |
---|---|---|
committer | Endi S. Dewata <edewata@redhat.com> | 2016-08-12 23:17:05 +0200 |
commit | 71acaed02642c618a729fbebbf7a7025684967a3 (patch) | |
tree | b9314b539f98fa09bafbc6300ba3bbdc92074e6b | |
parent | 0fd31368d871c513c9833ca02bc08d15a48d6aa5 (diff) | |
download | pki-71acaed02642c618a729fbebbf7a7025684967a3.tar.gz pki-71acaed02642c618a729fbebbf7a7025684967a3.tar.xz pki-71acaed02642c618a729fbebbf7a7025684967a3.zip |
Added exception wrapper for invalid LDAP attribute syntax.
The LDAPExceptionConverter has been modified to wrap LDAPException
for invalid attribute syntax with BadRequestException.
https://fedorahosted.org/pki/ticket/833
-rw-r--r-- | base/common/src/com/netscape/certsrv/ldap/LDAPExceptionConverter.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/base/common/src/com/netscape/certsrv/ldap/LDAPExceptionConverter.java b/base/common/src/com/netscape/certsrv/ldap/LDAPExceptionConverter.java index 88b126351..51a1109f2 100644 --- a/base/common/src/com/netscape/certsrv/ldap/LDAPExceptionConverter.java +++ b/base/common/src/com/netscape/certsrv/ldap/LDAPExceptionConverter.java @@ -17,13 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; -import netscape.ldap.LDAPException; - import com.netscape.certsrv.base.BadRequestException; import com.netscape.certsrv.base.ConflictingOperationException; import com.netscape.certsrv.base.PKIException; import com.netscape.certsrv.base.ResourceNotFoundException; +import netscape.ldap.LDAPException; + /** * @author Endi S. Dewata */ @@ -39,6 +39,8 @@ public class LDAPExceptionConverter { return new ResourceNotFoundException("No such attribute.", e); case LDAPException.INVALID_DN_SYNTAX: return new BadRequestException("Invalid DN syntax.", e); + case LDAPException.INVALID_ATTRIBUTE_SYNTAX: + return new BadRequestException("Invalid attribute syntax.", e); case LDAPException.ENTRY_ALREADY_EXISTS: return new ConflictingOperationException("Entry already exists.", e); default: |