# Plugin security

**URL:** <https://forums.plex.tv/t/plugin-security/56465>\
**Category:** Dev/API Corner\
**Tags:** other-dev\
**Created:** [February 4, 2014, 8:06pm UTC](https://forums.plex.tv/t/plugin-security/56465 "2014-02-04T20:06:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![s\_razer](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/s_razer/32/8537_2.png) [@s\_razer](https://forums.plex.tv/u/s_razer)\
**Post date:** [February 4, 2014, 8:06pm UTC](https://forums.plex.tv/t/plugin-security/56465/1 "2014-02-04T20:06:55Z")

</div>

Is there anyway to keep a function from being started via a web browser?

&nbsp;

I have a function that takes a parameter of a file and works with that file. If I call that function from a web browser I can execute it outside of the plugin. Is there anyway to prevent this? The function should only be able to be called from within the plugin. I ask as this could be turned into a malicious security hole.

&nbsp;

The only thing I can think of would be to set a Dict['code'] variable to check against. I don't want to pass the parameter via a Dict[] because the function can be nestled.

&nbsp;

Thanks,

Chris

---

<div class="post-metadata">

**Author:** ![s\_razer](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/s_razer/32/8537_2.png) [@s\_razer](https://forums.plex.tv/u/s_razer)\
**Post date:** [February 4, 2014, 8:08pm UTC](https://forums.plex.tv/t/plugin-security/56465/2 "2014-02-04T20:08:40Z")

</div>

Actually, I think I can pass the parameter via a Dict[], but the question is still valid. Can a function be forced to run only within the pluigin?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 21, 2019, 1:14am UTC](https://forums.plex.tv/t/plugin-security/56465/3 "2019-12-21T01:14:04Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
