Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ldapjs/node-ldapjs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.3.3
Choose a base ref
...
head repository: ldapjs/node-ldapjs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v3.0.0
Choose a head ref
  • 18 commits
  • 125 files changed
  • 2 contributors

Commits on Feb 22, 2023

  1. Swap asn1 package

    jsumners committed Feb 22, 2023
    Copy the full SHA
    9fe58a4 View commit details
  2. Use asn1@1.0.0

    jsumners committed Feb 22, 2023
    Copy the full SHA
    8dce600 View commit details
  3. Update dependencies and CI (#796)

    * Update dependencies
    
    * Run CI for "next" releases
    
    * Grrr
    
    * Update target versions
    
    * Fix test on Node 17
    
    * Fix deprecation notice
    jsumners committed Feb 22, 2023
    Copy the full SHA
    caab2c2 View commit details
  4. Remove coveralls

    jsumners committed Feb 22, 2023
    Copy the full SHA
    9bd8761 View commit details
  5. Replace internal controls with @ldapjs/controls (#797)

    * Replace internal controls with @ldapjs/controls
    
    * Replace EntryChangeNotificationControl
    
    * Replace PagedResultsControl
    
    * Replace ServerSideSortingRequestControl
    
    * Replace ServerSideSortingResponseControl
    
    * Replace VLV controls
    
    * Reduce coverage requirement
    
    * Fix dependency qualifier
    jsumners committed Feb 22, 2023
    Copy the full SHA
    4355893 View commit details
  6. Copy the full SHA
    cb70776 View commit details
  7. Copy the full SHA
    5bab39f View commit details
  8. Migrate filter extensions (#809)

    * Replace presence filter
    
    * Replace equality filter
    
    * Remove TODO
    
    * Fix integration tests
    
    * Replace approximate filter
    
    * Replace extensible filter
    
    * Replace greater-than-equals filter
    
    * Replace less-than-equals filter
    
    * Replace remaining filters
    
    * Remove debug code
    
    * Remove transition code
    
    * Remove unnecessry isFilter
    
    * Remove unused code
    
    * Use LDAP filter string parsing from @ldapjs/filter
    
    * Move BER filter parsing to @ldapjs/filter
    
    * Fully replace internal filters module with @ldapjs/filter
    jsumners committed Feb 22, 2023
    Copy the full SHA
    9de9c70 View commit details
  9. Copy the full SHA
    6854658 View commit details
  10. Copy the full SHA
    f18dee4 View commit details
  11. Reduce coverage requirement

    jsumners committed Feb 22, 2023
    Copy the full SHA
    9038aeb View commit details
  12. Fix search attributes

    jsumners committed Feb 22, 2023
    Copy the full SHA
    0a3702e View commit details
  13. Copy the full SHA
    b08f8e9 View commit details
  14. Remove dtrace

    jsumners committed Feb 22, 2023
    Copy the full SHA
    cc042f9 View commit details
  15. Fix Set size querying

    jsumners committed Feb 22, 2023
    Copy the full SHA
    0ed0482 View commit details
  16. Update deps

    jsumners committed Feb 22, 2023
    Copy the full SHA
    547ceb6 View commit details
  17. Copy the full SHA
    f248b47 View commit details
  18. v3.0.0

    jsumners committed Feb 22, 2023
    Copy the full SHA
    67617fe View commit details
Showing with 721 additions and 8,737 deletions.
  1. +3 −0 .eslintrc.js
  2. +1 −1 .github/workflows/docs.yml
  3. +5 −0 .github/workflows/integration.yml
  4. +7 −14 .github/workflows/main.yml
  5. +3 −0 .npmrc
  6. +0 −4 .taprc
  7. +10 −0 .taprc.yml
  8. +0 −2 README.md
  9. +3 −4 docs/client.md
  10. +10 −3 docs/server.md
  11. +1 −1 examples/inmemory.js
  12. +0 −24 examples/snoopldap.d
  13. +0 −54 lib/assert.js
  14. +0 −160 lib/attribute.js
  15. +0 −213 lib/change.js
  16. +121 −79 lib/client/client.js
  17. +1 −1 lib/client/index.js
  18. +19 −9 lib/client/message-tracker/index.js
  19. +1 −1 lib/client/request-queue/enqueue.js
  20. +7 −13 lib/client/search_pager.js
  21. +0 −61 lib/controls/control.js
  22. +0 −83 lib/controls/entry_change_notification_control.js
  23. +2 −84 lib/controls/index.js
  24. +0 −82 lib/controls/paged_results_control.js
  25. +0 −82 lib/controls/persistent_search_control.js
  26. +0 −108 lib/controls/server_side_sorting_request_control.js
  27. +0 −100 lib/controls/server_side_sorting_response_control.js
  28. +0 −94 lib/controls/virtual_list_view_request_control.js
  29. +0 −112 lib/controls/virtual_list_view_response_control.js
  30. +0 −473 lib/dn.js
  31. +0 −120 lib/dtrace.js
  32. +1 −1 lib/errors/index.js
  33. +0 −27 lib/filters/and_filter.js
  34. +0 −35 lib/filters/approx_filter.js
  35. +0 −60 lib/filters/equality_filter.js
  36. +0 −44 lib/filters/escape.js
  37. +0 −59 lib/filters/ext_filter.js
  38. +0 −60 lib/filters/filter.js
  39. +0 −35 lib/filters/ge_filter.js
  40. +0 −208 lib/filters/index.js
  41. +0 −35 lib/filters/le_filter.js
  42. +0 −23 lib/filters/not_filter.js
  43. +0 −27 lib/filters/or_filter.js
  44. +0 −36 lib/filters/presence_filter.js
  45. +0 −70 lib/filters/substr_filter.js
  46. +13 −13 lib/index.js
  47. +0 −87 lib/messages/abandon_request.js
  48. +0 −34 lib/messages/abandon_response.js
  49. +0 −159 lib/messages/add_request.js
  50. +0 −22 lib/messages/add_response.js
  51. +0 −84 lib/messages/bind_request.js
  52. +0 −22 lib/messages/bind_response.js
  53. +0 −74 lib/messages/compare_request.js
  54. +0 −33 lib/messages/compare_response.js
  55. +0 −62 lib/messages/del_request.js
  56. +0 −22 lib/messages/del_response.js
  57. +0 −117 lib/messages/ext_request.js
  58. +0 −86 lib/messages/ext_response.js
  59. +27 −49 lib/messages/index.js
  60. +0 −110 lib/messages/message.js
  61. +0 −85 lib/messages/moddn_request.js
  62. +0 −22 lib/messages/moddn_response.js
  63. +0 −83 lib/messages/modify_request.js
  64. +0 −22 lib/messages/modify_response.js
  65. +86 −58 lib/messages/parser.js
  66. +0 −121 lib/messages/result.js
  67. +0 −188 lib/messages/search_entry.js
  68. +0 −101 lib/messages/search_reference.js
  69. +0 −152 lib/messages/search_request.js
  70. +33 −50 lib/messages/search_response.js
  71. +0 −62 lib/messages/unbind_request.js
  72. +0 −65 lib/messages/unbind_response.js
  73. +3 −3 lib/persistent_search.js
  74. +0 −53 lib/protocol.js
  75. +172 −151 lib/server.js
  76. +3 −3 lib/url.js
  77. +25 −25 package.json
  78. +5 −5 test-integration/client/issues.test.js
  79. +4 −0 test/.eslintrc.js
  80. +0 −163 test/attribute.test.js
  81. +0 −253 test/change.test.js
  82. +118 −130 test/client.test.js
  83. +1 −1 test/controls/control.test.js
  84. +0 −66 test/controls/entry_change_notification_control.test.js
  85. +0 −61 test/controls/paged_results_control.test.js
  86. +0 −99 test/controls/persistent_search_control.test.js
  87. +0 −95 test/controls/server_side_sorting_control_request.test.js
  88. +0 −105 test/controls/server_side_sorting_control_response.test.js
  89. +0 −94 test/controls/virtual_list_view_request_control.test.js
  90. +0 −68 test/controls/virtual_list_view_response_control.test.js
  91. +0 −234 test/dn.test.js
  92. +0 −54 test/filters/and.test.js
  93. +0 −85 test/filters/approx.test.js
  94. +0 −167 test/filters/eq.test.js
  95. +0 −82 test/filters/ext.test.js
  96. +0 −116 test/filters/ge.test.js
  97. +0 −116 test/filters/le.test.js
  98. +0 −45 test/filters/not.test.js
  99. +0 −54 test/filters/or.test.js
  100. +0 −141 test/filters/parse.test.js
  101. +0 −83 test/filters/presence.test.js
  102. +0 −152 test/filters/substr.test.js
  103. +18 −7 test/laundry.test.js
  104. +5 −5 test/lib/client/message-tracker/index.test.js
  105. +5 −5 test/lib/client/request-queue/enqueue.test.js
  106. +0 −118 test/messages/add_request.test.js
  107. +0 −56 test/messages/add_response.test.js
  108. +0 −58 test/messages/bind_request.test.js
  109. +0 −56 test/messages/bind_response.test.js
  110. +0 −64 test/messages/compare_request.test.js
  111. +0 −56 test/messages/compare_response.test.js
  112. +0 −47 test/messages/del_request.test.js
  113. +0 −56 test/messages/del_response.test.js
  114. +0 −125 test/messages/ext_request.test.js
  115. +0 −68 test/messages/ext_response.test.js
  116. +0 −60 test/messages/moddn_request.test.js
  117. +0 −56 test/messages/moddn_response.test.js
  118. +0 −86 test/messages/modify_request.test.js
  119. +0 −56 test/messages/modify_response.test.js
  120. +1 −34 test/messages/parser.test.js
  121. +0 −91 test/messages/search_entry.test.js
  122. +0 −96 test/messages/search_request.test.js
  123. +0 −56 test/messages/search_response.test.js
  124. +0 −37 test/messages/unbind_request.test.js
  125. +7 −55 test/server.test.js
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@ module.exports = {
es2021: true,
node: true
},
parserOptions: {
ecmaVersion: 'latest'
},
extends: [
'standard'
],
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '18'
- name: Install Packages
run: npm install
- name: Build Docs
5 changes: 5 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -4,9 +4,14 @@ name: 'Integration Tests'
# https://github.community/t5/GitHub-Actions/Github-Actions-services-not-reachable/m-p/30739/highlight/true#M538

on:
push:
branches:
- master
- next
pull_request:
branches:
- master
- next

jobs:
baseline:
21 changes: 7 additions & 14 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -4,9 +4,11 @@ on:
push:
branches:
- master
- next
pull_request:
branches:
- master
- next

jobs:
lint:
@@ -15,6 +17,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install Packages
run: npm install
- name: Lint Code
@@ -28,10 +32,9 @@ jobs:
- ubuntu-latest
- windows-latest
node:
- 10.13.0
- 10.x
- 12.x
- 14.x
- 16
- 18
- 19
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
@@ -42,13 +45,3 @@ jobs:
run: npm install
- name: Run Tests
run: npm run test:ci
- name: Coveralls Parallel
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
- name: Coveralls Finished
uses: coverallsapp/github-action@1.1.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# npm general settings
package-lock=false
legacy-peer-deps=true
4 changes: 0 additions & 4 deletions .taprc

This file was deleted.

10 changes: 10 additions & 0 deletions .taprc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# With PR #834 the code in this code base has been reduced significantly.
# As a result, the coverage percentages changed, and are much lower than
# previously. So we are reducing the requirements accordingly
branches: 50
functions: 50
lines: 50
statements: 50

files:
- 'test/**/*.test.js'
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -43,8 +43,6 @@ client on your system:

npm install ldapjs

DTrace support is included in ldapjs. To enable it, `npm install dtrace-provider`.

## License

MIT.
7 changes: 3 additions & 4 deletions docs/client.md
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ const client = ldap.createClient({
url: ['ldap://127.0.0.1:1389', 'ldap://127.0.0.2:1389']
});

client.on('error', (err) => {
client.on('connectError', (err) => {
// handle connection error
})
```
@@ -41,7 +41,6 @@ client is:
|connectTimeout |Milliseconds client should wait before timing out on TCP connections (Default: OS default)|
|tlsOptions |Additional options passed to TLS connection layer when connecting via `ldaps://` (See: The TLS docs for node.js)|
|idleTimeout |Milliseconds after last activity before client emits idle event|
|strictDN |Force strict DN parsing for client methods (Default is true)|
|reconnect |Try to reconnect when the connection gets lost (Default is false)|

### url
@@ -287,7 +286,7 @@ Responses inside callback of the `search` method are an `EventEmitter` where you
each `searchEntry` that comes back from the server. You will additionally be able to listen for a `searchRequest`
, `searchReference`, `error` and `end` event.
`searchRequest` is emitted immediately after every `SearchRequest` is sent with a `SearchRequest` parameter. You can do operations
like `client.abandon` with `searchRequest.messageID` to abandon this search request. Note that the `error` event will
like `client.abandon` with `searchRequest.messageId` to abandon this search request. Note that the `error` event will
only be for client/TCP errors, not LDAP error codes like the other APIs. You'll want to check the LDAP status code
(likely for `0`) on the `end` event to assert success. LDAP search results can give you a lot of status codes, such as
time or size exceeded, busy, inappropriate matching, etc., which is why this method doesn't try to wrap up the code
@@ -306,7 +305,7 @@ client.search('o=example', opts, (err, res) => {
assert.ifError(err);

res.on('searchRequest', (searchRequest) => {
console.log('searchRequest: ', searchRequest.messageID);
console.log('searchRequest: ', searchRequest.messageId);
});
res.on('searchEntry', (entry) => {
console.log('entry: ' + JSON.stringify(entry.object));
13 changes: 10 additions & 3 deletions docs/server.md
Original file line number Diff line number Diff line change
@@ -80,8 +80,15 @@ Example:
`listen(port, [host], [callback])`

Begin accepting connections on the specified port and host. If the host is
omitted, the server will accept connections directed to any IPv4 address
(INADDR\_ANY).
omitted, the server will accept connections directed to the IPv4 address
`127.0.0.1`. To listen on any other address, supply said address as the `host`
parameter. For example, to listen on all available IPv6 addresses supply
`::` as the `host` (note, this _may_ also result in listening on all
available IPv4 addresses, depending on operating system behavior).

We highly recommend being as explicit as possible with the `host` parameter.
Listening on all available addresses (through `::` or `0.0.0.0`) can lead
to potential security issues.

This function is asynchronous. The last parameter callback will be called when
the server has been bound.
@@ -197,7 +204,7 @@ authenticated as on this connection. If the client didn't bind, then a DN object
will be there defaulted to `cn=anonymous`.

Additionally, request will have a `logId` parameter you can use to uniquely
identify the request/connection pair in logs (includes the LDAP messageID).
identify the request/connection pair in logs (includes the LDAP messageId).

## Common Response Elements

2 changes: 1 addition & 1 deletion examples/inmemory.js
Original file line number Diff line number Diff line change
@@ -130,7 +130,7 @@ server.search(SUFFIX, authorize, function (req, res, next) {
case 'base':
if (req.filter.matches(db[dn])) {
res.send({
dn: dn,
dn,
attributes: db[dn]
})
}
24 changes: 0 additions & 24 deletions examples/snoopldap.d

This file was deleted.

54 changes: 0 additions & 54 deletions lib/assert.js

This file was deleted.

Loading