Socket
Socket
Sign inDemoInstall

ldapts

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ldapts - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

4

CHANGELOG.md
### 1.0.3
* Add type definitions for asn1
### 1.0.3
* Verify the socket exists before sending unbind message

@@ -4,0 +8,0 @@

8

dist/Attribute.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");
const ProtocolOperation_1 = require("./ProtocolOperation");

@@ -17,7 +15,3 @@ class Attribute {

for (const value of this.values) {
writer.writeByte(asn1_1.Ber.OctetString);
writer.writeLength(value.length);
for (const valueByte of value) {
writer.writeByte(valueByte);
}
writer.writeString(value);
}

@@ -24,0 +18,0 @@ }

@@ -419,3 +419,3 @@ "use strict";

else {
messageDetails.reject(new Error('Connection closed.'));
messageDetails.reject(new Error(`Connection closed. Message type: ${messageDetails.message.protocolOperation}`));
}

@@ -422,0 +422,0 @@ }

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -5,0 +4,0 @@ const EntryChangeNotificationControl_1 = require("./controls/EntryChangeNotificationControl");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -5,0 +4,0 @@ const Control_1 = require("./Control");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -5,0 +4,0 @@ const Control_1 = require("./Control");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -5,0 +4,0 @@ const Control_1 = require("./Control");

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -53,3 +52,3 @@ const Control_1 = require("./Control");

if (typeof value.reverseOrder !== 'undefined') {
controlWriter.writeString(value.reverseOrder, 0x81);
controlWriter.writeBoolean(value.reverseOrder, 0x81);
}

@@ -56,0 +55,0 @@ controlWriter.endSequence();

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -5,0 +4,0 @@ const Filter_1 = require("./Filter");

@@ -29,6 +29,11 @@ "use strict";

case 0x84:
this.dnAttributes = reader.readBoolean(tag);
this.dnAttributes = reader.readBoolean();
break;
default:
throw new Error(`Invalid ext_match filter type: 0x${tag.toString(16)}`);
default: {
let type = '<null>';
if (tag) {
type = `0x${tag.toString(16)}`;
}
throw new Error(`Invalid ext_match filter type: ${type}`);
}
}

@@ -35,0 +40,0 @@ }

@@ -43,4 +43,9 @@ "use strict";

break;
default:
throw new Error(`Invalid substring filter type: 0x${tag.toString(16)}`);
default: {
let type = '<null>';
if (tag) {
type = `0x${tag.toString(16)}`;
}
throw new Error(`Invalid substring filter type: ${type}`);
}
}

@@ -47,0 +52,0 @@ }

@@ -10,3 +10,2 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -35,3 +34,3 @@ const assert = __importStar(require("assert"));

const reader = new asn1_1.BerReader(this.buffer);
let foundSequence = false;
let foundSequence = null;
try {

@@ -38,0 +37,0 @@ foundSequence = reader.readSequence();

import { BerReader, BerWriter } from 'asn1';
import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
export interface AbandonRequestMessageOptions extends MessageOptions {

@@ -7,2 +8,3 @@ abandonId?: number;

export declare class AbandonRequest extends Message {
protocolOperation: ProtocolOperation;
abandonId: number;

@@ -9,0 +11,0 @@ constructor(options: AbandonRequestMessageOptions);

import { BerReader, BerWriter } from 'asn1';
import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
export interface BindRequestMessageOptions extends MessageOptions {

@@ -8,2 +9,3 @@ dn?: string;

export declare class BindRequest extends Message {
protocolOperation: ProtocolOperation;
dn: string;

@@ -10,0 +12,0 @@ password: string;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -24,3 +23,7 @@ const Message_1 = require("./Message");

if (contextCheck !== asn1_1.Ber.Context) {
throw new Error(`Authentication type not supported: 0x${contextCheck.toString(16)}`);
let type = '<null>';
if (contextCheck) {
type = `0x${contextCheck.toString(16)}`;
}
throw new Error(`Authentication type not supported: ${type}`);
}

@@ -27,0 +30,0 @@ this.password = reader.readString(asn1_1.Ber.Context);

import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
export declare class BindResponse extends MessageResponse {
protocolOperation: ProtocolOperation;
constructor(options: MessageResponseOptions);
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const MessageResponse_1 = require("./MessageResponse");

@@ -5,0 +4,0 @@ const ProtocolOperation_1 = require("../ProtocolOperation");

import { BerReader, BerWriter } from 'asn1';
import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
export interface CompareRequestMessageOptions extends MessageOptions {

@@ -9,2 +10,3 @@ dn?: string;

export declare class CompareRequest extends Message {
protocolOperation: ProtocolOperation;
dn: string;

@@ -11,0 +13,0 @@ attribute: string;

import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
export declare enum CompareResult {

@@ -21,3 +22,4 @@ /**

export declare class CompareResponse extends MessageResponse {
protocolOperation: ProtocolOperation;
constructor(options: MessageResponseOptions);
}
import { BerReader, BerWriter } from 'asn1';
import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
export interface DeleteRequestMessageOptions extends MessageOptions {

@@ -7,2 +8,3 @@ dn?: string;

export declare class DeleteRequest extends Message {
protocolOperation: ProtocolOperation;
dn: string;

@@ -9,0 +11,0 @@ constructor(options: DeleteRequestMessageOptions);

@@ -19,3 +19,3 @@ "use strict";

const length = reader.length;
this.dn = reader.buffer.slic(0, length).toString('utf8');
this.dn = reader.buffer.slice(0, length).toString('utf8');
reader._offset += reader.length;

@@ -22,0 +22,0 @@ }

import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
export declare class DeleteResponse extends MessageResponse {
protocolOperation: ProtocolOperation;
constructor(options: MessageResponseOptions);
}
/// <reference types="node" />
import { BerReader, BerWriter } from 'asn1';
import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
export interface ExtendedRequestMessageOptions extends MessageOptions {

@@ -9,2 +10,3 @@ oid?: string;

export declare class ExtendedRequest extends Message {
protocolOperation: ProtocolOperation;
oid: string;

@@ -11,0 +13,0 @@ value: string | Buffer;

@@ -28,3 +28,3 @@ "use strict";

catch (ex) {
this.value = reader.readBuffer(0x81);
this.value = reader.readString(0x81, true);
}

@@ -31,0 +31,0 @@ }

import { BerReader } from 'asn1';
import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
export interface ExtendedResponseOptions extends MessageResponseOptions {

@@ -12,2 +13,3 @@ oid?: string;

export declare class ExtendedResponse extends MessageResponse {
protocolOperation: ProtocolOperation;
oid?: string;

@@ -14,0 +16,0 @@ value?: string;

@@ -12,3 +12,3 @@ /// <reference types="node" />

messageId: number;
protocolOperation?: ProtocolOperation;
abstract protocolOperation: ProtocolOperation;
controls?: Control[];

@@ -15,0 +15,0 @@ protected constructor(options: MessageOptions);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const asn1_1 = require("asn1");

@@ -5,0 +4,0 @@ const ProtocolOperation_1 = require("../ProtocolOperation");

import { BerReader, BerWriter } from 'asn1';
import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
export interface ModifyDNRequestMessageOptions extends MessageOptions {

@@ -10,2 +11,3 @@ deleteOldRdn?: boolean;

export declare class ModifyDNRequest extends Message {
protocolOperation: ProtocolOperation;
deleteOldRdn: boolean;

@@ -12,0 +14,0 @@ dn: string;

import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
export declare class ModifyDNResponse extends MessageResponse {
protocolOperation: ProtocolOperation;
constructor(options: MessageResponseOptions);
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// @ts-ignore
const MessageResponse_1 = require("./MessageResponse");

@@ -5,0 +4,0 @@ const ProtocolOperation_1 = require("../ProtocolOperation");

import { BerReader } from 'asn1';
import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
import { Attribute } from '../Attribute';

@@ -9,2 +10,3 @@ export interface SearchEntryOptions extends MessageResponseOptions {

export declare class SearchEntry extends MessageResponse {
protocolOperation: ProtocolOperation;
name: string;

@@ -11,0 +13,0 @@ attributes: Attribute[];

import { BerReader } from 'asn1';
import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
export interface SearchReferenceOptions extends MessageResponseOptions {

@@ -7,2 +8,3 @@ uris?: string[];

export declare class SearchReference extends MessageResponse {
protocolOperation: ProtocolOperation;
uris: string[];

@@ -9,0 +11,0 @@ constructor(options: SearchReferenceOptions);

import { BerReader, BerWriter } from 'asn1';
import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
import { Filter } from '../filters/Filter';

@@ -9,2 +10,3 @@ import { SearchOptions } from '../Client';

export declare class SearchRequest extends Message {
protocolOperation: ProtocolOperation;
baseDN: string;

@@ -11,0 +13,0 @@ scope: 'base' | 'one' | 'sub' | 'children';

@@ -64,4 +64,3 @@ "use strict";

this.filter.write(writer);
// tslint:disable-next-line:no-bitwise
writer.startSequence(writer.Sequence | writer.Constructor);
writer.startSequence();
if (this.attributes && this.attributes.length) {

@@ -76,4 +75,36 @@ for (const attribute of this.attributes) {

this.baseDN = reader.readString();
this.scope = reader.readEnumeration();
this.derefAliases = reader.readEnumeration();
const scope = reader.readEnumeration();
switch (scope) {
case 0:
this.scope = 'base';
break;
case 1:
this.scope = 'one';
break;
case 2:
this.scope = 'sub';
break;
case 3:
this.scope = 'children';
break;
default:
throw new Error(`Invalid search scope: ${scope}`);
}
const derefAliases = reader.readEnumeration();
switch (scope) {
case 0:
this.derefAliases = 'never';
break;
case 1:
this.derefAliases = 'search';
break;
case 2:
this.derefAliases = 'find';
break;
case 3:
this.derefAliases = 'always';
break;
default:
throw new Error(`Invalid deref alias: ${derefAliases}`);
}
this.sizeLimit = reader.readInt();

@@ -80,0 +111,0 @@ this.timeLimit = reader.readInt();

import { MessageResponse, MessageResponseOptions } from './MessageResponse';
import { ProtocolOperation } from '../ProtocolOperation';
import { SearchEntry } from './SearchEntry';

@@ -9,2 +10,3 @@ import { SearchReference } from './SearchReference';

export declare class SearchResponse extends MessageResponse {
protocolOperation: ProtocolOperation;
searchEntries: SearchEntry[];

@@ -11,0 +13,0 @@ searchReferences: SearchReference[];

import { Message, MessageOptions } from './Message';
import { ProtocolOperation } from '../ProtocolOperation';
export declare class UnbindRequest extends Message {
protocolOperation: ProtocolOperation;
constructor(options: MessageOptions);
}
{
"name": "ldapts",
"version": "1.0.3",
"version": "1.0.4",
"description": "LDAP client",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc