Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module: security to prevent different types of attacks #1755

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 13 additions & 13 deletions src/modules/secfilter/secfilter.c
Expand Up @@ -75,12 +75,12 @@ db_func_t db_funcs; /* Database API functions */
db1_con_t* db_handle=0; /* Database connection handle */

/* Exported module parameters - default values */
int dst_exact_match = 1;
str db_url = {NULL, 0};
str table_name = str_init("secfilter");
str action_col = str_init("action");
str type_col = str_init("type");
str data_col = str_init("data");
int sec_dst_exact_match = 1;
str sec_db_url = {NULL, 0};
str sec_table_name = str_init("secfilter");
str sec_action_col = str_init("action");
str sec_type_col = str_init("type");
str sec_data_col = str_init("data");

/* Exported commands */
static cmd_export_t cmds[]={
Expand All @@ -96,12 +96,12 @@ static cmd_export_t cmds[]={

/* Exported module parameters */
static param_export_t params[]={
{"db_url", PARAM_STRING, &db_url},
{"table_name", PARAM_STR, &table_name },
{"action_col", PARAM_STR, &action_col },
{"type_col", PARAM_STR, &type_col },
{"data_col", PARAM_STR, &data_col },
{"dst_exact_match", PARAM_INT, &dst_exact_match },
{"db_url", PARAM_STRING, &sec_db_url},
{"table_name", PARAM_STR, &sec_table_name },
{"action_col", PARAM_STR, &sec_action_col },
{"type_col", PARAM_STR, &sec_type_col },
{"data_col", PARAM_STR, &sec_data_col },
{"dst_exact_match", PARAM_INT, &sec_dst_exact_match },
{0, 0, 0}
};

Expand Down Expand Up @@ -160,7 +160,7 @@ static int w_check_dst(struct sip_msg *msg, char *val)

uppercase(val);

if (dst_exact_match == 0)
if (sec_dst_exact_match == 0)
{
for (i = 0; i < *sec_nDst; i++)
{
Expand Down