mirror of
https://git.proxmox.com/git/proxmox
synced 2025-07-10 15:42:13 +00:00
login: boolean parser: also accept "1" and "0" as strings
since that's what the pve api sometimes returns for booleans Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
7379bdfb9c
commit
eb3dd9453b
@ -94,11 +94,13 @@ where
|
||||
let value = if value.eq_ignore_ascii_case("true")
|
||||
|| value.eq_ignore_ascii_case("yes")
|
||||
|| value.eq_ignore_ascii_case("on")
|
||||
|| value == "1"
|
||||
{
|
||||
true
|
||||
} else if value.eq_ignore_ascii_case("false")
|
||||
|| value.eq_ignore_ascii_case("no")
|
||||
|| value.eq_ignore_ascii_case("off")
|
||||
|| value == "0"
|
||||
{
|
||||
false
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user