# Plugin for Preventing Malicious Linking

**URL:** <https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693>\
**Category:** Plugin\
**Created:** [Décembre 24, 2017, 11:28 UTC](https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693 "2017-12-24T11:28:24Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Sudaraka](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sudaraka/32/68401_2.png) [@Sudaraka](https://meta.discourse.org/u/Sudaraka)\
**Post date:** [Décembre 24, 2017, 11:28 UTC](https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693/1 "2017-12-24T11:28:24Z")

</div>

This is a simple plugin for adding a warning to posts when there are malicious urls present in the content of the post. For identifying malicious urls this plugin uses [Google Safe Browsing API V4](https://developers.google.com/safe-browsing/) . The warning appears as below

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/e/7e5d777dafaab8bad48ef759307e68bd9d572c72.png)

For getting this plugin to work , you need to obtain an API key to access the Google Safe Browsing API . You have to follow [this](https://developers.google.com/safe-browsing/v4/get-started) guideline to get an API key. Other than the API key you need a Client ID and a Client Version. These details are used by google for logging purposes. You can find more about those two parameters from [here](https://developers.google.com/safe-browsing/v4/lookup-api#http-post-request). You can set those parameters by clicking `settings` in front of the plugin name in `Admin Settings -> Plugins`

 ![image](https://global.discourse-cdn.com/meta/original/3X/0/f/0fc1a43dce0524c0098a70868e6e0809a5c747ba.png)

You can find source for the plugin [here](https://github.com/sudaraka94/preventing-malicious-linking-plugin) . You can find more about installing this plugin [here](https://meta.discourse.org/t/install-a-plugin/19157) .  
FYI : The API key in the above image is not a valid key 😉

Here is a simple demo how my plugin works,

[![](https://global.discourse-cdn.com/meta/original/4X/e/9/2/e92e6dd3ac030e6217d017f7f8381d96a1444c25.jpeg "plugin-demo") ](https://vimeo.com/248638795)

---

_[View the full topic](https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693)._
