#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Posts
    1
    Rep 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."/>
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,273
    Rep Power
    968
    Not sure....are you using SSL for the site but not for the image URL or something?

IMN logo majestic logo threadwatch logo seochat tools logo