Untitled Document

LOG IN

Please log into the WEARS System

#DateFormat(Now(), "mmmm d, yyyy")#
#TimeFormat(Now(), "long")#

 

 

Username:
Password:

 

 

 

 

 

Thanks for your time!! Jeff [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => jedale [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 1 [islastshown] => [isfirstshown] => 1 [attachments] => [allattachments] => ) --> [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => CFDEBUG [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 2 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Problems with User Autentication - Coldfusion - Getting Started

Problems with User Autentication - Coldfusion - Getting Started

I am trying to develop a login page for my website using a table with userID and Password through a coldfusion interface. I used some of the code that dreamweaver gives you to login in a user by creating a sever behavior. This code allows me to input a username and password that I should be able to match up to the database table. This is the opposite of what it is doing, the code only takes my username and password and goes to the "login_failed.cfm" page. This is the only thing that happens even if I put in a ...

  1. #1

    Default Problems with User Autentication

    I am trying to develop a login page for my website using a table with userID
    and Password through a coldfusion interface. I used some of the code that
    dreamweaver gives you to login in a user by creating a sever behavior. This
    code allows me to input a username and password that I should be able to match
    up to the database table. This is the opposite of what it is doing, the code
    only takes my username and password and goes to the "login_failed.cfm" page.
    This is the only thing that happens even if I put in a correct username and
    password.

    I have been working on this problem for a while and I don't know that much
    about html other then getting aquainted with it for less than a month.

    If anybody could help me out with this that would be great!
    Here is the exact code that I have:

    </html>
    <cfif IsDefined("FORM.Username")>
    <cfset MM_redirectLoginSuccess="eelv/act_sub.cfm">
    <cfset MM_redirectLoginFailed="login_failed.cfm">
    <cfquery name="MM_rsUser" datasource="cfdocexamples">
    SELECT UserID,Password,Roles
    FROM LoginInfo
    WHERE UserID='#FORM.Username#'
    AND Password='#FORM.Password#'
    </cfquery>
    <cfif MM_rsUser.RecordCount NEQ 0>
    <cftry>
    <cflock scope="Session" timeout="30" type="Exclusive">
    <cfset Session.MM_Username=MM_rsUser.UserID>
    <cfset Session.MM_UserAuthorization=MM_rsUser.Roles[1]>
    </cflock>
    <cfif IsDefined("URL.accessdenied") AND true>
    <cfset MM_redirectLoginSuccess=URL.accessdenied>
    </cfif>
    <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
    <cfcatch type="Lock">
    <!--- code for handling timeout of cflock --->
    </cfcatch>
    </cftry>
    </cfif>
    <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
    <cfelse>
    <cfset MM_LoginAction=CGI.SCRIPT_NAME>
    <cfif CGI.QUERY_STRING NEQ "">
    <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)>
    </cfif>
    </cfif>

    <head>
    <meta http-equiv="Content-Type" content="text/html; cht=iso-8859-1" />
    <title>Untitled Doent</title>
    <link href="css/bluestyles.css" rel="stylesheet" type="text/css" />
    <style type="text/css">

    .style2 { font-size: 16px;
    font-weight: bold;
    color: #FFFFFF;
    }
    </style>
    </head>
    <body>
    <div id="Header"> </div>
    <div id="Image"> </div>
    <!-- Editable Region -->
    <div id="Content">
    <p class="style2">LOG IN </p>
    <p align="left" class="style2">Please log into the WEARS System </p>
    <div align="right"><cfoutput>#DateFormat(Now(), "mmmm d,
    yyyy")#</cfoutput></div>
    <div align="right"><cfoutput>#TimeFormat(Now(), "long")#</cfoutput></div>
    <p align="left" class="style2">&nbsp;</p>
    <p align="left" class="style2">&nbsp;</p>
    <p align="left" class="style2">
    <form ACTION="<cfoutput>#MM_loginAction#</cfoutput>" name="FORM"
    method="POST">
    <table>
    <tr>
    <td valign="top"><span class="style2"> Username: </span></td>
    <td><input size="50" maxlength=250 type="text"
    name="Username">
    </td>
    </tr>
    <tr>
    <td valign="top"><strong> Password: </strong></td>
    <td><input size="50" maxlength=250 type="text"
    name="Password">
    </td>
    </tr>
    </table>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <div align="center">
    <input type="submit" name="Submit" value="Log In">
    </div>
    </form>
    </div>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    </body>
    </html>

    Thanks for your time!!
    Jeff



    jedale Guest

  2. #2

    Default Re: Problems with User Autentication

    Even though you have MM_redirectLoginSuccess set to act_sub.cfm, there is a
    posssibility that this is being changed where you are checking for
    url.accessdenied and assigning its value to MM_redirectLoginSuccess. So double
    check ur url variables when posting.

    Also your failure redirection is out of context. If you notice, you have
    closed the cfif before the failure cflocation. So it should be



    <cfif IsDefined("FORM.Username")>
    <cfset MM_redirectLoginSuccess="eelv/act_sub.cfm">
    <cfset MM_redirectLoginFailed="login_failed.cfm">
    <cfquery name="MM_rsUser" datasource="cfdocexamples">
    SELECT UserID,Password,Roles
    FROM LoginInfo
    WHERE UserID='#FORM.Username#'
    AND Password='#FORM.Password#'
    </cfquery>
    <cfif MM_rsUser.RecordCount NEQ 0>
    <cftry>
    <cflock scope="Session" timeout="30" type="Exclusive">
    <cfset Session.MM_Username=MM_rsUser.UserID>
    <cfset Session.MM_UserAuthorization=MM_rsUser.Roles[1]>
    </cflock>
    <cfif IsDefined("URL.accessdenied") AND true>
    <cfset MM_redirectLoginSuccess=URL.accessdenied>
    </cfif>
    <cflocation url="#MM_redirectLoginSuccess#" addtoken="no">
    <cfcatch type="Lock">
    <!--- code for handling timeout of cflock --->
    </cfcatch>
    </cftry>
    <cfelse>
    <cflocation url="#MM_redirectLoginFailed#" addtoken="no">
    </cfif>
    <cfelse>
    <cfset MM_LoginAction=CGI.SCRIPT_NAME>
    <cfif CGI.QUERY_STRING NEQ "">
    <cfset MM_LoginAction=MM_LoginAction & "?" & XMLFormat(CGI.QUERY_STRING)>
    </cfif>
    </cfif>

    CFDEBUG Guest

Similar Threads

  1. Login and New User Problems
    By Lynx Blade in forum Macromedia Dynamic HTML
    Replies: 2
    Last Post: August 18th, 03:37 PM
  2. Windows autentication with WindowsPrinicipal
    By naijacoder naijacoder in forum ASP.NET Security
    Replies: 2
    Last Post: September 2nd, 11:31 AM
  3. Windows autentication PROBLEMS
    By naija naija in forum ASP.NET Security
    Replies: 0
    Last Post: August 31st, 07:41 AM
  4. Replies: 1
    Last Post: February 13th, 06:23 AM
  5. Problems With Files Sent to AOL User
    By LadyMovieFan in forum Mac Networking
    Replies: 9
    Last Post: August 9th, 02:18 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •