mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-24 11:43:05 +01:00
Qt/patches: check if serial is 9 characters long and alphanumeric
This commit is contained in:
parent
d05d803f5e
commit
93424d1adc
@ -330,6 +330,12 @@ bool patch_engine::load(patch_map& patches_map, const std::string& path, std::st
|
||||
is_valid = false;
|
||||
continue;
|
||||
}
|
||||
else if (serial.size() != 9 || !std::all_of(serial.begin(), serial.end(), [](char c) { return std::isalnum(c); }))
|
||||
{
|
||||
append_log_message(log_messages, fmt::format("Error: Serial '%s' invalid (patch: %s, key: %s, location: %s, file: %s)", serial, description, main_key, get_yaml_node_location(serial_node), path), &patch_log.error);
|
||||
is_valid = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (const auto yml_type = serial_node.second.Type(); yml_type != YAML::NodeType::Sequence)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user