Skip to main content
May 16, 2008
Question

Simple login script fails in EI 7

  • May 16, 2008
  • 5 replies
  • 589 views
Greetings

I have been using this simple login script (action page shown) for years- it now fails in IE 7 but works fine in Firefox?

<CFQUERY name="auth_cso" datasource="cso.mdb">
SELECT user_pw, user_ID
FROM user
WHERE user_pw = '#Form.user_pw#'
</CFQUERY>

<CFIF auth_cso.RecordCount EQ 0 >

<html>
<head>
<title>Incorrect Password</title>
</head>

<body>
<font face="Arial, Helvtica" color="navy">
<h3><img src="images/50_alert_icon.jpg" width="50" height="46" alt="" border="0">  Incorrect Password</h3>

<p><a href="login.cfm">Please Try Again</a></p>
</body>
</html>

<CFELSE>
<cfset Session.user_id = auth_cso.user_pw>
<cflocation url="edit.cfm">

</CFIF>

Could this be caused by some settings in IE?

Running CF8 Server.

Thanks for any help with this!
This topic has been closed for replies.

5 replies

BKBK
Community Expert
Community Expert
May 18, 2008
Newportri wrote:
Could this be caused by some settings in IE?

Probably not. You should use the session variable for login validation in Application.cfc, thus

<cfif not isDefined("session.user_id") or session.user_id is "">
<!--- code that sends client to the login page --->
</cfif>

May 16, 2008
Thanks- I can prevent cookies from being passed in the Application.cfm- this would prevent the problem?

Thanks again.
Inspiring
May 16, 2008
quote:

Originally posted by: newportri
Thanks- I can prevent cookies from being passed in the Application.cfm- this would prevent the problem?

Thanks again.


No. This is likely a client side (IE) issue. By default sessions create a cookie, you either need to verify that your IE settings allow cookies or support sessions without using cookies.


http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=sharedVars_10.html
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=sharedVars_05.html
Inspiring
May 16, 2008
cfdump and cfabort on your login action page will help you troubleshoot the problem. Put it right after the query to start and then react to what you see.

Inspiring
May 16, 2008
Since you are using sessions verify that IE is set to accept cookies.
May 16, 2008
Thanks for your quick response.

It simply does not take the UN & PW- bounces back to the login pge - IOW nothing happens.

If the wrong un/pw is/are entered, it does correctly show the error page.

Thanks again,

newportri
Inspiring
May 16, 2008
What is the nature of the failure?