Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question need module to get these variables

More
16 years 2 weeks ago #45928 by ringlas
Thank you both of you for your help!

I finally got it, it works like a charm... for now!

For security reasons, I want to ask several things:

How do I hide my module's source? The other modules' sources don't show up when you look at them. Mine has a submit form and I can see with any browser's view source and I can see which is its action file.

The other question is, how can I restrict direct access to a file in my module without using

defined('_JEXEC') or die('Restricted access');

Thanks to whoever responds!

Please Log in or Create an account to join the conversation.

More
16 years 2 weeks ago #45942 by xillibit
ringlas wrote:

Thank you both of you for your help!

I finally got it, it works like a charm... for now!

For security reasons, I want to ask several things:

How do I hide my module's source? The other modules' sources don't show up when you look at them. Mine has a submit form and I can see with any browser's view source and I can see which is its action file.


It's not clear for me. Why you want to hide the action url ?

ringlas wrote:


defined('_JEXEC') or die('Restricted access');

This is the only way to prevent direct acces and it's a security protection, i don't know how your module is build, this question is a bit strnage for me.

I don't provide support by PM, because this can be useful for someone else.

Please Log in or Create an account to join the conversation.

More
16 years 2 weeks ago #45946 by ringlas
Forgive me for not being clear enough! ^^

The thing is that I didn't want to use defined('_JEXEC') or die('Restricted access'); because it gives me a bug, however, I did manage to figure it out using another hidden variable which I post to that file and check if it is true or false and restricts the rest of the code.

About the other issues. I want to hide my html form tags when someone uses "view source" from browser. I've been told that this could be done using JQuery or some ajax scripting but I wonder how...?

Thank you for quick responses!

Please Log in or Create an account to join the conversation.

More
16 years 2 weeks ago #45949 by Cerberus
The short answer to how to do this is you can't. The slightly longer answer is that you can't if your pages use HTML.

When someone views your page, their browser needs to be able to read your source code in order to be able to determine what your page contains and how to display it. The browser first copies the source from the internet to the user's Temporary Internet Files folder on their computer prior to rendering the page in their browser window. In many cases the source code for your page is still stored on their computer even after they have disconnected from the internet. Anyone with a text editor on their computer (and that's everyone with a computer) can then access your source code by editing these files that are stored on their own computer. If you stop them from being able to download your pages like this then you also stop them from being able to read your page at all so you may as well not upload it in the first place.

With HTML pages on the web, the only thing that you can do is to make things harder for novices who might want to learn from your code, anyone who wants to steal your code knows ways around all of the obstacles and will still be able to steal your page.

The most common thing that people do to discourage novices from viewing their source code is to use a Javascript to disable the menu that displays when you right click on the page. You can find scripts to do this on just about any Javascript site and there are lots available on Javascripts.com. Unfortunately, the view source option on this menu is just a shortcut to the source and does not stop the user from selecting the same option from the view menu in the browser menu bar. Also there is nothing to stop visitors to your site from turning off the Javascript support in their browser so as to bypass any scripts you might have used.

Another trick is to place a large comment (of fifty lines or so) in the top of your source that advises that your source is protected and cannot be viewed. Novices may not realize that they only have to page down to find the source code.

You can find more information about the various ways that can be used to access and view the source code of html pages regardless of what "protection" the page author has implemented on the page "Viewing Someone Else's Source". Often being able to view the source of other people's pages is a good thing because it enables us to see how other people have been able to achieve the various effects implemented in their page and thus improve our knowledge of html, javascript, etc.

Unfortunately, the way the web works, all of the images on our page are also easily accessible along with the source code so there is no way to protect these from being stolen either. The best that we can do is to embed a copyright notice into the image itself which will hopefully discourage visitors from stealing them. For information about one way to place copyright notices into your images using Photoshop see "Adding a Copyright Notice".

A Solution
The only real way to create web pages where the source cannot be viewed is to not use HTML. HTML is designed so that it can be created in a text editor and anyone with a text editor can read it.

Portable Document Format (PDF) files can also be displayed in a web browser (and display exactly as created rather than being rendered by the browser). PDFs require Adobe Acrobat to be able to create fully functional web pages and a freely available for download Acrobat Reader to be able to render them on the screen (a plug-in allows PDFs to render in browser windows).

Try to access the PDF source using a text editor and all you see is a mess of characters. Yes it is possible to extract the text from one of these files with a large amount of effort but the formatting information is in a totally unusable form. The only way to properly see the page complete with all of its formatting is to use Acrobat Reader or the full Adobe Acrobat product.

With PDF you can even build security into your page that restricts what people can do with your page (even if they have Acrobat) unless they know one of two passwords. One password is used to stop the page from being able to be opened at all by anyone who doesn't know it. The other password can be used to stop people who are viewing the page from performing one or more of the following: printing the page, changing the page, selecting text and graphics, and adding or changing note or form fields. This Acrobat Example page cannot be printed or edited by you even if you own a copy of the full version of Acrobat.

Please Log in or Create an account to join the conversation.

More
16 years 2 weeks ago #45951 by ringlas
Wow! Thank you for your full and well explained answer!
Thank you all for helping me!

Please Log in or Create an account to join the conversation.

More
16 years 2 weeks ago #45953 by Cerberus
your welcome :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.320 seconds