Jump to content

ANTI RIGHT CLICKING


Recommended Posts

  • 2 weeks later...

Disabling right-clicking serves no use and has nothing to do with security.

First thing first, when I browse your website I already own a copy of your theme information (HTML, CSS, javascript, libraries, assets...). I don't need right-click to get eveything my computer "sees". I just need to press File > Save Page As. This way I'll have a folder that runs on my computer with an exact copy of your website. Alternaivelly I can use source view, dev console or any other tool that every browser has.

Secondly anyone with a bit of sense can re-enable right-click with few lines of javascript via console. It takes seconds. Not to mention there are tens of plugins that allow to re-enable the possibility to use right-click (sorry for the pun) in one click.

Third. Did you know that anyone can download/view every file of your Smarty template by simply visiting it? Try opening /templates/{YOUR_TEMPLATE}/clientareahome.tpl. Most people don't know that and it's funny 😛 Sometimes you can spot things that should stay reserved. For example in invoicepdf.tpl I often see insults towards WHMCS developers, swear words and so on. Many belive that comments in tpl files are hidden from public view.

Given that you can't prevent people from downloading your code, don't waste time fighting right-click. The only outcome is frustration for your customers.

Link to comment
Share on other sites

9 hours ago, Kian said:

Did you know that anyone can download/view every file of your Smarty template by simply visiting it? Try opening /templates/{YOUR_TEMPLATE}/clientareahome.tpl.

Unless you prevent that via .htaccess. 🙂

Link to comment
Share on other sites

Fun, right?
In the document root of your entire site should be a file named .htaccess (if you don't see it, "dot" files may be hidden). 
In that, the following should block it:

<FilesMatch "\.(tpl|bak)$">
#Order Allow,Deny
#Deny from all
Require all denied 
</FilesMatch>

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated