Skip to content

Commit

Permalink
fix: always unbind after bind, fixes #12
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Aug 23, 2024
1 parent 1aecf4b commit 2e5365c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
### Unreleased


### [1.1.3] - 2024-08-23

- fix: always unbind after bind, fixes #12

### [1.1.2] - 2024-03-15

- ci: customized publish script
Expand Down Expand Up @@ -29,12 +33,10 @@
- test: add fixtures for setting up slapd on macosx and linux
- doc(README): update with GHA badge


#### 1.0.2 - 2017-09-30

- check_rcpt must return next(ok) if a valid recipient was found


#### 1.0.2 - 2016-12-10

- test get_alias for resolve-by-dn case
Expand All @@ -44,3 +46,4 @@

[1.1.1]: https://github.com/haraka/haraka-plugin-ldap/releases/tag/1.1.1
[1.1.2]: https://github.com/haraka/haraka-plugin-ldap/releases/tag/1.1.2
[1.1.3]: https://github.com/haraka/haraka-plugin-ldap/releases/tag/1.1.3
3 changes: 2 additions & 1 deletion authn.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ exports._verify_user = (userdn, passwd, cb, connection) => {
if (err) return onError(err);

client.bind(userdn, passwd, (err2) => {
client.unbind();

if (err2) {
connection.logdebug(`Login failed, could not bind ${ util.inspect(userdn) }: ${ util.inspect(err)}`);
return cb(false)
}

client.unbind();
cb(true);
})
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haraka-plugin-ldap",
"version": "1.1.2",
"version": "1.1.3",
"description": "Haraka plugin for LDAP",
"main": "index.js",
"directories": {},
Expand Down

0 comments on commit 2e5365c

Please sign in to comment.