mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-08 07:35:44 +08:00
Username case insensitive, patch db instead of using LIKE
This commit is contained in:
@@ -15,7 +15,7 @@ exports.login = async function (username, password) {
|
||||
return null;
|
||||
}
|
||||
|
||||
let user = await R.findOne("user", " username LIKE ? AND active = 1 ", [
|
||||
let user = await R.findOne("user", " username = ? AND active = 1", [
|
||||
username,
|
||||
]);
|
||||
|
||||
|
@@ -66,6 +66,7 @@ class Database {
|
||||
"patch-add-radius-monitor.sql": true,
|
||||
"patch-monitor-add-resend-interval.sql": true,
|
||||
"patch-maintenance-table2.sql": true,
|
||||
"patch-user-username-case-insensitive.sql": { parents: [ "patch-2fa-invalidate-used-token.sql", "patch-2fa.sql" ] }
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user