<p>Thanks for this submission!</p>
<p>Few remarks after a very brief look at the patch:</p>
<ul>
<li>global variables must be declared in a .c file and the .h file has to list them with <code>external</code>, otherwise they get defined in each .c file where the .h file is included</li>
<li>it is recommended to use a prefix for all global variables and functions (which are not declared static) in order to avoid symbol conflicts. It can be the module name or a short form of it (e.g., <code>sec</code>)</li>
</ul>
<p>One thing that is not something critical, but maybe worth discussing it before merging: is the name of the module <code>security</code> too generic for what the modules does? It does mainly filters, so eventually can be named <code>secfilter</code> (from security filter) in order to suggest better its purpose... I would like to avoid very generic names that can induce the perception it does everything expected in the scope of that name.</p>

<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#issuecomment-444445644">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZeTjHysUL5ceZy4O_4JVubbFvMvpks5u16clgaJpZM4ZCb-V">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZSJK5xPP4A5iVUCFpfWWrXqhOkxkks5u16clgaJpZM4ZCb-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":"PERSON","message":"@miconda in #1755: Thanks for this submission!\r\n\r\nFew remarks after a very brief look at the patch:\r\n\r\n  * global variables must be declared in a .c file and the .h file has to list them with `external`, otherwise they get defined in each .c file where the .h file is included\r\n  * it is recommended to use a prefix for all global variables and functions (which are not declared static) in order to avoid symbol conflicts. It can be the module name or a short form of it (e.g., `sec`)\r\n\r\nOne thing that is not something critical, but maybe worth discussing it before merging: is the name of the module `security` too generic for what the modules does? It does mainly filters, so eventually can be named `secfilter` (from security filter) in order to suggest better its purpose... I would like to avoid very generic names that can induce the perception it does everything expected in the scope of that name."}],"action":{"name":"View Pull Request","url":"https://github.com/kamailio/kamailio/pull/1755#issuecomment-444445644"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/1755#issuecomment-444445644",
"url": "https://github.com/kamailio/kamailio/pull/1755#issuecomment-444445644",
"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": "Re: [kamailio/kamailio] Module: security to prevent different types of attacks (#1755)",
"sections": [
{
"text": "",
"activityTitle": "**Daniel-Constantin Mierla**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@miconda",
"facts": [

]
}
],
"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#issuecomment-444445644"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 420069269\n}"
}
],
"themeColor": "26292E"
}
]</script>