# Plugin for Preventing Malicious Linking

**URL:** https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693
**Category:** Plugin
**Created:** [December 24, 2017, 11:28am UTC](https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693 "2017-12-24T11:28:24Z")
**Posts on this page:** 4
**Page:** 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: [December 24, 2017, 11:28am 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)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [February 3, 2019, 2:11am UTC](https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693/2 "2019-02-03T02:11:48Z")

</div>

Can we verify this still works? Might be a good encouragement task for someone to update this and make sure it’s still working etc.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [February 3, 2019, 4:21am UTC](https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693/3 "2019-02-03T04:21:29Z")

</div>

Sure, giving it a go now.

---

<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: [February 3, 2019, 4:36am UTC](https://meta.discourse.org/t/plugin-for-preventing-malicious-linking/76693/4 "2019-02-03T04:36:26Z")

</div>

Hi @Stephen,  
Please let me know if you have any issues
