I have written many javascript functions for my website and recently I found out that those functions can be called simply by writing javascript:FunctionName();
on URL bar. Calling functions like this can be vulnerable for my website so is there any ways to prevent this? Any ways to stop the use of Javascript on address bar?
Any subtle ways can also be helpful like any ways to detect from where the call to the function was made and if it was not from the address bar then the function should run, otherwise it won't run?
I tried using Javascript on address bar on Facebook but it didn't work. So there must be a way to stop this..