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!
Dan Bracuk - 16 May 2008 14:34 GMT
What is the nature of the failure?
newportri - 16 May 2008 16:06 GMT
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
Dan Bracuk - 16 May 2008 16:19 GMT
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.
JR "Bob" Dobbs - 16 May 2008 17:09 GMT
Since you are using sessions verify that IE is set to accept cookies.
newportri - 16 May 2008 17:18 GMT
Thanks- I can prevent cookies from being passed in the Application.cfm- this would prevent the problem?
Thanks again.
JR "Bob" Dobbs - 16 May 2008 17:28 GMT
[q][i]Originally posted by: [b][b]newportri[/b][/b][/i]
Thanks- I can prevent cookies from being passed in the Application.cfm- this
would prevent the problem?
Thanks again.[/q]
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
BKBK - 18 May 2008 19:29 GMT
Newportri wrote:
[i]Could this be caused by some settings in IE?[/i]
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>