ソースを参照

BugFix: fix getLdapConfigurationFunc doesn't returns function when 'serverUrl' is invalid

Yuki Takei 8 年 前
コミット
cf3305e878
1 ファイル変更1 行追加1 行削除
  1. 1 1
      lib/service/passport.js

+ 1 - 1
lib/service/passport.js

@@ -170,7 +170,7 @@ class PassportService {
     const match = serverUrl.match(/(ldaps?:\/\/[^\/]+)\/(.*)?/);
     if (match == null || match.length < 1) {
       debug('LdapStrategy: serverUrl is invalid');
-      return;
+      return (req, callback) => { callback({ message: 'serverUrl is invalid'}) };
     }
     const url = match[1];
     const searchBase = match[2] || '';