This forum has been moved here:
Helicon Tech Community Forum

  Active TopicsActive Topics  Display List of Forum MembersMemberlist  HelpHelp   RegisterRegister  LoginLogin
HotlinkBlocker (Forum Locked Forum Locked)
 Helicon Tech : HotlinkBlocker
Subject Topic: Bug in HotLinkBlocker (Topic Closed Topic Closed)
Author
Message |
Cryogeneric
Newbie


Joined: 10 October 2008
Posts: 4
Posted: 10 October 2008 at 5:55pm  

I believe there is a bug in the HotLinkBlocker.

I have an application that allows users to log in and view PDF reports. I use the HotLinkBlocker to prevent users from simply Hot Linking directly to the PDF's without logging in. It works excellent except for one small detail:

The LAST PDF report link the user clicks NEVER expires.... I have set the expiration to 10 seconds, and for some reason the link will stay active indefinitely. The link ONLY expires when I close the browser.

I think this is a bug. The link should expire after 10 seconds just as I have configured it to do so. All of the other links expire, just the last link clicked doesn't. I shouldn't have to close the browser, either.

Has anyone else seen this problem? Is there a fix? Thank a mil....

Jason

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 13 October 2008 at 5:47am  

Is it possible to see your problem online?
And couldn't it happen that this pdf file got into browser cache?

__________________
Regards,
Anton
Back to Top
 
Cryogeneric
Newbie


Joined: 10 October 2008
Posts: 4
Posted: 15 October 2008 at 3:55pm  

Anton wrote:
Is it possible to see your problem online?
And couldn't it happen that this pdf file got into browser cache?

Hi Anton, I've setup a simple test and will PM you the URL. Please don't make the URL public, thanks. :)

All you need to do is run the test. I'm using IE 7.0.5730.13. Click on all three of the PDF links. They will display the bottom frame. Keep note of the LAST pdf you clicked. When you are done, leave the page, but don't close the browser. View your history pane and expand the test URL. You should see the test PDF's. You can directly hotlink the last PDF you looked at. It won't expire. The link only expires when the browser is closed.

The code is as follows:

Location of source files:

http://host_ip/HotLinkBlockerTest/

Location of PDF files and HotLink protected

http://host_ip/HotLinkBlockerTest/PDF/

Three files:

index.html

------------------------------------------------------------------

<html><head><title>HotLinkBlocker Test</title></head>

<frameset rows="180,*" frameborder=yes border=5>
 <frame name=r1 src="choosePDF.html" scrolling=no>
 <frame name=r2 src="displayPDF.asp" scrolling=no>
</frameset>

</html>

------------------------------------------------------------------

choosePDF.html

<html>
<head>

<script>

function DisplayThePDF(pdfID){
 parent.r2.location = "displayPDF.asp?PDFName=Test"+pdfID+".pdf";
}

</script>

</head>

<body>


<h1>HotLinkBlocker Test</h1>

<br>

<h3>
<a href="javascript:DisplayThePDF(1);">Display PDF 1</a>
<br>
<a href="javascript:DisplayThePDF(2);">Display PDF 2</a>
<br>
<a href="javascript:DisplayThePDF(3);">Display PDF 3</a>
</h3>


</body>

</html>

------------------------------------------------------------------

displayPDF.asp


<%
'-------------------------------------------------------
' Declare global script variables
'-------------------------------------------------------

Dim gStrPDFName  'As String
Dim gStrPDFPath  'As String

'-------------------------------------------------------
'
'-------------------------------------------------------
Sub ShowThePDF()
%>
<html>
<head>

<title>Display PDF</title>

</head>

<body>

<center>

<h3><%=gStrPDFPath%></h3>

<% If gStrPDFName <> "NONE" Then %>
 <iframe name="reportPDF" src="<%=gStrPDFPath%>" width="100%" height="100%"></iframe>
<% Else %>
 <h3>Please select a PDF from above.</h3>
<% End If %>

</center>

</form>
</body>
</html>
<%
End Sub
'-------------------------------------------------------
'
'-------------------------------------------------------
Sub Main()

 gStrPDFName = Request.QueryString("PDFName")
 
 'when the current action is null, set it to NONE
 If Len(gStrPDFName) = 0 Then
  gStrPDFName = "NONE"
 Else
  'set the PDF path
 
  gStrPDFPath = "
http://host_ip/HotLinkBlockerTest" &_
  "/PDF/xxxxxxxxxxxxxxxx/" & gStrPDFName
 End If

 Call ShowThePDF()
 
End Sub

' Main function must always be last in the code
'-------------------------------------------------------
Call Main
'-------------------------------------------------------
%>

 

 

Back to Top
 
Cryogeneric
Newbie


Joined: 10 October 2008
Posts: 4
Posted: 15 October 2008 at 3:59pm  

Well, I guess this forum doesn't allow PM's... can you email me and I'll email you back?

 

Thanks

Back to Top
 
Anton
Admin Group


Joined: 30 January 2007
Location: Ukraine
Posts: 10519
Posted: 21 October 2008 at 7:39am  

Please send your email to [email protected]

__________________
Regards,
Anton
Back to Top
 
Cryogeneric
Newbie


Joined: 10 October 2008
Posts: 4
Posted: 21 October 2008 at 12:36pm  

Thanks Anton--- I've sent the email.
Back to Top
 

Sorry, you can NOT post a reply.
This forum has been locked by a forum administrator.

Printable version Printable version
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum