Skip to content

Commit 017a647

Browse files
committed
[misc] Add fallback check for simple_password_check plugin in password validation detection
1 parent ab1c0fe commit 017a647

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/integration/auth-plugin.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,14 @@ describe.concurrent('authentication plugin', () => {
652652
} catch (e) {
653653
strictPasswordValidation = false;
654654
}
655+
if (!strictPasswordValidation) {
656+
try {
657+
const res = await shareConn.query("SELECT * FROM information_schema.PLUGINS WHERE PLUGIN_NAME = 'simple_password_check' AND PLUGIN_STATUS = 'ACTIVE'");
658+
if (res.length > 0) strictPasswordValidation = true;
659+
} catch (e) {
660+
// ignore
661+
}
662+
}
655663

656664
await shareConn.query('drop user verifParsec' + getHostSuffix()).catch(() => {});
657665
await shareConn.query(

0 commit comments

Comments
 (0)