This commit is contained in:
sxyazi 2024-04-04 20:57:51 +08:00
parent e435a56a17
commit 11ee5fce09
No known key found for this signature in database

View file

@ -37,6 +37,9 @@ impl<'a> Body<'a> {
"hi" | "hey" | "cd" | "hover" | "rename" | "bulk" | "yank" => { "hi" | "hey" | "cd" | "hover" | "rename" | "bulk" | "yank" => {
Err("Cannot construct system event from Lua").into_lua_err()? Err("Cannot construct system event from Lua").into_lua_err()?
} }
_ if !kind.bytes().all(|b| b.is_ascii_alphanumeric() || b == b'-') => {
Err("Kind must be alphanumeric with dashes").into_lua_err()?
}
_ => BodyCustom::from_lua(kind, value)?, _ => BodyCustom::from_lua(kind, value)?,
}) })
} }