Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Simple login script fails in EI 7

Guest
May 16, 2008 May 16, 2008
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!
TOPICS
Advanced techniques
540
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2008 May 16, 2008
What is the nature of the failure?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 16, 2008 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 16, 2008 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 16, 2008 May 16, 2008
Since you are using sessions verify that IE is set to accept cookies.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 16, 2008 May 16, 2008
Thanks- I can prevent cookies from being passed in the Application.cfm- this would prevent the problem?

Thanks again.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
May 16, 2008 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 18, 2008 May 18, 2008
LATEST
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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources