VoiceOverTV Posted May 11, 2022 Share Posted May 11, 2022 Hi guys im new to WHCMS and im a little bit worried and i will like to add another layer of security by adding an ANTI RIGHT CLICKING on the client area is this possible and how complicated is this? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted May 11, 2022 Share Posted May 11, 2022 Though you could probably add it, there's little point, as it can be bypassed very easily, regardless of how you do it. What are you trying to protect with it? 1 Quote Link to comment Share on other sites More sharing options...
VoiceOverTV Posted May 19, 2022 Author Share Posted May 19, 2022 Well to be honest i just want to add that layer of protection and also hide plugins addons and theme information 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted May 20, 2022 Share Posted May 20, 2022 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. 2 Quote Link to comment Share on other sites More sharing options...
bear Posted May 20, 2022 Share Posted May 20, 2022 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. 🙂 0 Quote Link to comment Share on other sites More sharing options...
VoiceOverTV Posted May 20, 2022 Author Share Posted May 20, 2022 Whattttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt OMG how can i avoid this? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted May 20, 2022 Share Posted May 20, 2022 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> 0 Quote Link to comment Share on other sites More sharing options...
VoiceOverTV Posted May 21, 2022 Author Share Posted May 21, 2022 Thanks you so much you are a genious that code can i place it after the message End of xxxxxxxxx of any plugin on the site and please tell me is there a way to change the default domain whmcs admin login page? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted May 21, 2022 Share Posted May 21, 2022 That isn't code to use within plugins, it's to be used in the .htaccess file specifically.https://httpd.apache.org/docs/2.4/howto/htaccess.html 1 Quote Link to comment Share on other sites More sharing options...
Damo Posted May 21, 2022 Share Posted May 21, 2022 Also check this li L and the security advice steps in the documentation. https://docs.whmcs.com/Customising_the_Admin_Directory 1 Quote Link to comment Share on other sites More sharing options...
VoiceOverTV Posted May 21, 2022 Author Share Posted May 21, 2022 Thank you so much for your help! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.