<h4>Pre-Submission Checklist</h4>



<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commit message has the format required by CONTRIBUTING guide</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Commits are split per component (core, individual modules, libs, utils, ...)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Each component has a single commit (if not, squash them into one commit)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> No commits to README files for modules (changes must be done to docbook files<br>
in <code>doc/</code> subfolder, the README file is autogenerated)</li>
</ul>
<h4>Type Of Change</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Small bug fix (non-breaking change which fixes an issue)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> New feature (non-breaking change which adds new functionality)</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Breaking change (fix or feature that would change existing functionality)</li>
</ul>
<h4>Checklist:</h4>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> PR should be backported to stable branches</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Tested changes locally</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Related to issue #XXXX (replace XXXX with an open issue number)</li>
</ul>
<h4>Description</h4>

<p>This module has been designed to offer an additional layer of security over our communications. To achieve this, the following features are available: Blacklist to filter user agents, IP addresses, countries, domains and users. Whitelist to filter user agents, IP addresses, countries, domains and users. Blacklist of destinations where calling is not allowed. SQL injection attacks prevention.</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/kamailio/kamailio/pull/1755'>https://github.com/kamailio/kamailio/pull/1755</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Module security: create database SQL</li>
  <li>Module security: database schema</li>
  <li>Module security: new module</li>
  <li>Change dst_exact_match from string to integer</li>
  <li>fix Makefile description</li>
  <li>update descriptions</li>
  <li>Now it is possible to define the names of the columns in as parameters of the module</li>
  <li>Update description</li>
  <li>Update description</li>
  <li>Fix sqli checks for some headers</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-0">src/lib/srdb1/schema/security.xml</a>
    (65)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-1">src/modules/security/Makefile</a>
    (14)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-2">src/modules/security/README</a>
    (461)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-3">src/modules/security/doc/Makefile</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-4">src/modules/security/doc/security.xml</a>
    (33)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-5">src/modules/security/doc/security_admin.xml</a>
    (601)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-6">src/modules/security/security.c</a>
    (376)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-7">src/modules/security/security.h</a>
    (64)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-8">src/modules/security/security_db.c</a>
    (408)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-9">src/modules/security/security_hdr.c</a>
    (294)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-10">src/modules/security/security_rpc.c</a>
    (212)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-11">utils/kamctl/db_sqlite/security-create.sql</a>
    (11)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-12">utils/kamctl/mysql/security-create.sql</a>
    (11)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-13">utils/kamctl/oracle/security-create.sql</a>
    (19)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/kamailio/kamailio/pull/1755/files#diff-14">utils/kamctl/postgres/security-create.sql</a>
    (11)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/kamailio/kamailio/pull/1755.patch'>https://github.com/kamailio/kamailio/pull/1755.patch</a></li>
  <li><a href='https://github.com/kamailio/kamailio/pull/1755.diff'>https://github.com/kamailio/kamailio/pull/1755.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/1755">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36Zeeet49ZrijzK7Zq_RI1aLxoDLTUks5u16AggaJpZM4ZCb-V">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZdwqAoQjna13znO8o_FivrhD-xAxks5u16AggaJpZM4ZCb-V.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Module: security to prevent different types of attacks (#1755)"}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1755"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1755",
"url": "https://github.com/kamailio/kamailio/pull/1755",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "Module: security to prevent different types of attacks (#1755)",
"sections": [
{
"text": "",
"activityTitle": "**Pepelux**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@Pepelux",
"facts": [

]
},
{
"title": "Commit Summary",
"facts": [
{
"name": "bd98a1d",
"value": "Module security: create database SQL"
},
{
"name": "2c06ae4",
"value": "Module security: database schema"
},
{
"name": "e127ee6",
"value": "Module security: new module"
},
{
"name": "d3c6673",
"value": "Change dst_exact_match from string to integer"
},
{
"name": "fe71f76",
"value": "fix Makefile description"
},
{
"name": "d78e996",
"value": "update descriptions"
},
{
"name": "09c32ea",
"value": "Now it is possible to define the names of the columns in as parameters of the module"
},
{
"name": "cc912c6",
"value": "Update description"
},
{
"name": "488c063",
"value": "Update description"
},
{
"name": "a6df4f0",
"value": "Fix sqli checks for some headers"
}
]
},
{
"title": "File Changes",
"facts": [
{
"name": "Added",
"value": "[src/lib/srdb1/schema/security.xml](https://github.com/kamailio/kamailio/pull/1755/files#diff-0) (65 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/Makefile](https://github.com/kamailio/kamailio/pull/1755/files#diff-1) (14 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/README](https://github.com/kamailio/kamailio/pull/1755/files#diff-2) (461 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/doc/Makefile](https://github.com/kamailio/kamailio/pull/1755/files#diff-3) (3 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/doc/security.xml](https://github.com/kamailio/kamailio/pull/1755/files#diff-4) (33 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/doc/security_admin.xml](https://github.com/kamailio/kamailio/pull/1755/files#diff-5) (601 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/security.c](https://github.com/kamailio/kamailio/pull/1755/files#diff-6) (376 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/security.h](https://github.com/kamailio/kamailio/pull/1755/files#diff-7) (64 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/security_db.c](https://github.com/kamailio/kamailio/pull/1755/files#diff-8) (408 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/security_hdr.c](https://github.com/kamailio/kamailio/pull/1755/files#diff-9) (294 changes)"
},
{
"name": "Added",
"value": "[src/modules/security/security_rpc.c](https://github.com/kamailio/kamailio/pull/1755/files#diff-10) (212 changes)"
},
{
"name": "Added",
"value": "[utils/kamctl/db_sqlite/security-create.sql](https://github.com/kamailio/kamailio/pull/1755/files#diff-11) (11 changes)"
},
{
"name": "Added",
"value": "[utils/kamctl/mysql/security-create.sql](https://github.com/kamailio/kamailio/pull/1755/files#diff-12) (11 changes)"
},
{
"name": "Added",
"value": "[utils/kamctl/oracle/security-create.sql](https://github.com/kamailio/kamailio/pull/1755/files#diff-13) (19 changes)"
},
{
"name": "Added",
"value": "[utils/kamctl/postgres/security-create.sql](https://github.com/kamailio/kamailio/pull/1755/files#diff-14) (11 changes)"
}
]
}
],
"potentialAction": [
{
"name": "Add a comment",
"@type": "ActionCard",
"inputs": [
{
"isMultiLine": true,
"@type": "TextInput",
"id": "IssueComment",
"isRequired": false
}
],
"actions": [
{
"name": "Comment",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"IssueComment\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"issueId\": 1755,\n\"IssueComment\": \"{{IssueComment.value}}\"\n}"
}
]
},
{
"name": "Close pull request",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"PullRequestClose\",\n\"repositoryFullName\": \"kamailio/kamailio\",\n\"pullRequestId\": 1755\n}"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1755"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1755.patch"
}
],
"@type": "OpenUri",
"name": "View patch"
},
{
"targets": [
{
"os": "default",
"uri": "https://github.com/kamailio/kamailio/pull/1755.diff"
}
],
"@type": "OpenUri",
"name": "View diff"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 420069269\n}"
}
],
"themeColor": "26292E"
}
]</script>