Unverified Commit 0384f700 authored by sean1025's avatar sean1025 Committed by GitHub

Merge pull request #1631 from vvkkhjt/master

修改ldap filter的匹配规则,使其可以匹配&和|操作符
parents 441ed57e 04f84aa7
......@@ -114,8 +114,8 @@ exports.ldapQuery = (username, password) => {
const searchStandard = ldapLogin.searchStandard;
// 处理可以自定义filter
let customFilter;
if (/^&/gi.test(searchStandard)) {
customFilter = util.format(searchStandard, username);
if (/^(&|\|)/gi.test(searchStandard)) {
customFilter = searchStandard.replace(/%s/g,username);
} else {
customFilter = `${searchStandard}=${username}`;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment