Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Finding page location in cf

$
0
0

Hi People,

 

When I am using iframes or frames (older sites), as a extra security precaution I use the JavaScript function:

 

<SCRIPT LANGUAGE="JavaScript1.1">

if (top == self) self.location.href = "../index.cfm";

</SCRIPT>

 

<cfif (HTTP_REFERER DOES NOT CONTAIN "referer_page.cfm")

<cfabort>

</cfif>

 

It works great to keep visitors (hackers?) from opening and/or trying to post to the page.

 

The problem is that the JavaScript displays in source code and the less they know...

 

I know the JS is client side but is there anyway to create the function in the server side CF or otherwise hide from prying eyes?

 

I a running cf9 on my and most of my client sites.

 

Thank in advance


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>