mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-11-16 23:05:58 +01:00
core: don't auth on empty password (#126)
This commit is contained in:
parent
19d7844f04
commit
6a085d7f8e
1 changed files with 4 additions and 2 deletions
|
@ -703,9 +703,11 @@ void CHyprlock::onKey(uint32_t key, bool down) {
|
|||
if (m_sPasswordState.passBuffer.length() > 0)
|
||||
m_sPasswordState.passBuffer = m_sPasswordState.passBuffer.substr(0, m_sPasswordState.passBuffer.length() - 1);
|
||||
} else if (SYM == XKB_KEY_Return || SYM == XKB_KEY_KP_Enter) {
|
||||
Debug::log(LOG, "Authenticating");
|
||||
if (m_sPasswordState.passBuffer.length() > 0) {
|
||||
Debug::log(LOG, "Authenticating");
|
||||
|
||||
m_sPasswordState.result = g_pPassword->verify(m_sPasswordState.passBuffer);
|
||||
m_sPasswordState.result = g_pPassword->verify(m_sPasswordState.passBuffer);
|
||||
}
|
||||
} else if (SYM == XKB_KEY_Escape) {
|
||||
Debug::log(LOG, "Clearing password buffer");
|
||||
|
||||
|
|
Loading…
Reference in a new issue