Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

vpopmail: fail faster during a CRAM-MD5 auth attempt with an invalid use... #581

Merged
merged 1 commit into from

2 participants

@msimerson
Collaborator

...rname

@smfreegard smfreegard merged commit 1cae798 into from
@msimerson msimerson deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 8 additions and 1 deletion.
  1. +8 −1 plugins/auth/auth_vpopmaild.js
View
9 plugins/auth/auth_vpopmaild.js
@@ -140,7 +140,14 @@ exports.get_plain_passwd = function (user, cb) {
socket.end(); // disconnect
}
if (chunk_count > 2) {
- if (!/clear_text_password/.test(chunk)) { return; }
+ if (/^\-ERR/.test(chunk)) {
+ plugin.logerror("get_plain failed: " + chunk);
+ socket.end(); // disconnect
+ return;
+ }
+ if (!/clear_text_password/.test(chunk)) {
+ return; // pass might be in the next chunk
+ }
var pass = chunk.match(/clear_text_password\s(\S+)\s/);
plain_pass = pass[1];
socket.write("quit\n\r");
Something went wrong with that request. Please try again.