Comparing version 0.4.0 to 0.4.1
@@ -85,2 +85,18 @@ // Copyright 2011 Mark Cavage, Inc. All rights reserved. | ||
if (this.dnAttribute) | ||
throw new Error('ExtensibleMatch dnAttributes not supported'); | ||
if (!this.value) | ||
return false; | ||
var self = this; | ||
if (this.matchType && target.hasOwnProperty(this.matchType)) { | ||
return Filter.multi_test(function(v) { | ||
if (self.rule === '2.5.13.2') | ||
return self.value.toLowerCase() === v.toLowerCase(); | ||
return self.value === v; | ||
}, target[this.matchType]); | ||
} | ||
return false; | ||
@@ -91,3 +107,24 @@ }; | ||
ExtensibleFilter.prototype.parse = function(ber) { | ||
throw new Error('ExtensibleFilter not supported'); | ||
var end = ber.offset + ber.length; | ||
while (ber.offset < end) { | ||
var tag = ber.peek(); | ||
switch (tag) { | ||
case 0x81: | ||
this.rule = ber.readString(tag); | ||
break; | ||
case 0x82: | ||
this.matchType = ber.readString(tag); | ||
break; | ||
case 0x83: | ||
this.value = ber.readString(tag); | ||
break; | ||
case 0x84: | ||
this.dnAttributes = ber.readBoolean(tag); | ||
break; | ||
default: | ||
throw new Error('Invalid ext_match filter type: 0x' + tag.toString(16)); | ||
} | ||
} | ||
return true; | ||
}; | ||
@@ -94,0 +131,0 @@ |
@@ -6,3 +6,3 @@ { | ||
"description": "LDAP client and server APIs", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"repository": { | ||
@@ -9,0 +9,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
461558
120
9991