diff --git a/lib/DAV/plugins/auth/file.js b/lib/DAV/plugins/auth/file.js index 73e52b38..f9de5c5d 100644 --- a/lib/DAV/plugins/auth/file.js +++ b/lib/DAV/plugins/auth/file.js @@ -43,6 +43,9 @@ function jsDAV_Auth_Backend_File(filename) { return cbloadfile(err); data.split("\n").forEach(function(line) { + if( '' == line ) /* ignore empty lines (including one at end of file) */ + cbloadfile(); + var parts = line.split(":"); if (line.length !== 3) cbloadfile(new Exc.jsDAV_Exception("Malformed htdigest file. Every line should contain 2 colons"));