comparison mod_firewall/mod_firewall.lua @ 2550:19a182651a9b

mod_firewall: Allow backslash escapes in definitions
author Matthew Wild <mwild1@gmail.com>
date Thu, 23 Feb 2017 14:00:43 +0000
parents 2ff588094938
children 2b533a7b5236
comparison
equal deleted inserted replaced
2549:2ff588094938 2550:19a182651a9b
375 val = f:read("*a"):gsub("\r?\n", " "):gsub("%s+$", ""); 375 val = f:read("*a"):gsub("\r?\n", " "):gsub("%s+$", "");
376 end 376 end
377 if not val then 377 if not val then
378 return nil, errmsg("No value given for definition"); 378 return nil, errmsg("No value given for definition");
379 end 379 end
380 380 val = stripslashes(val);
381 local ok, ret = pcall(definition_handlers[what], name, val); 381 local ok, ret = pcall(definition_handlers[what], name, val);
382 if not ok then 382 if not ok then
383 return nil, errmsg(ret); 383 return nil, errmsg(ret);
384 end 384 end
385 385