Comparison

mod_client_management/mod_client_management.lua @ 5604:5ade45d93908

mod_client_management: Fix missing equality check
author Kim Alvefur <zash@zash.se>
date Fri, 14 Jul 2023 15:44:55 +0200
parent 5603:d2561c1d26f5
child 5606:da69496180e7
comparison
equal deleted inserted replaced
5603:d2561c1d26f5 5604:5ade45d93908
323 if not ok then return nil, "internal-server-error"; end 323 if not ok then return nil, "internal-server-error"; end
324 return true; 324 return true;
325 elseif c_type == "software" then 325 elseif c_type == "software" then
326 local active_clients = get_active_clients(username); 326 local active_clients = get_active_clients(username);
327 for _, client in ipairs(active_clients) do 327 for _, client in ipairs(active_clients) do
328 if client.user_agent and client.user_agent.software == c_id or user_agent_tostring(client.user_agent) then 328 if client.user_agent and client.user_agent.software == c_id or user_agent_tostring(client.user_agent) == c_id then
329 return revoke_client_access(username, client.id); 329 return revoke_client_access(username, client.id);
330 end 330 end
331 end 331 end
332 end 332 end
333 end 333 end