
May 15th, 2012, 09:13 PM
|
|
Registered User
|
|
Join Date: Sep 2011
Posts: 1
Time spent in forums: 1 h 9 m 43 sec
Reputation Power: 0
|
|
|
Cfimage captcha over https error in chrome
I have a website with a cart and checkout requiring a captcha that I call via a cfinclude statement. In google chrome, I get the error that The page at https://www.domain.com/checkout.cfm displayed insecure content from http://www.domain.com/captchaImage.cfm.
The code is below. Any help is appreciated.
---captchaimage.cfm---
Code:
<!--- captchaImage.cfm - generates png captchas --->
<cfset arrValidChars = ListToArray("A,B,C,D,E,F,G,H,J,K,M,N,P,Q,R,S,T,U,V,W,X,Y,Z," & "2,3,4,5,6,7,8,9") />
<cfset CreateObject("java", "java.util.Collections").Shuffle(arrValidChars)/>
<cfset strCaptcha = (arrValidChars[ 1 ] & arrValidChars[ 2 ] & arrValidChars[ 3 ] & arrValidChars[ 4 ]) />
<cfset Session.captchaText = strCaptcha/>
<cfset captchaimagepath = getdirectoryfrompath(getcurrenttemplatepath()) & 'captcha' & gettickcount() & '.png'>
<cfimage action="captcha" width="192" height="40" text="#session.captchaText#" destination="#captchaimagepath#" difficulty="low" fonts="Arial, Verdana, Tahoma, Times New Roman">
<cfcontent reset="yes" type="image/png" file="#captchaimagepath#" deletefile="yes">
---call to captcha image ---
Code:
<p>Enter the letters you see in the image:</p>
<img src="/captchaImage.cfm" id="sessioncaptcha" alt="captcha" width="192" height="40" /><br>
<input class="submit" type="button" name="btnRefreshCaptcha" value="Get New Image" onClick="document.getElementById('sessioncaptcha').src='/captchaImage.cfm?r='+new Date().getTime();" />
<cfinput type="text" name="captcha" id="captcha" required="yes" message="Enter the characters in the Image."/>
|