소스 검색

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] || '';