helLO 11-07-2002, 01:39 AM Is there something called virtual address which help to hide the real web address and display a so-called false address? Is there a way in doing this with coldfusion? If there isn't, what should i do? Do i have to configure setting? If yes, how should i do it?
Need help urgently...
Thanks...
whammy 11-08-2002, 12:57 AM I don't know of any way to actually hide the real URL except for using a frameset with a top frame of 0 height. Perhaps there is a way server-side (although I doubt it), but I've never heard of it.
Why do you want to hide the address?
helLO 11-08-2002, 01:04 AM I want to hide it is because i don't want ppl to go to my website without passing the login page... (Which means that the person know the exact address to my datas) Are there any ways to prevent this from happening?
whammy 11-08-2002, 02:23 AM Of course, you can make sure they have already logged into the website by comparing the username and password they enter to what is in your user database.
I have never developed in cold fusion, but by doing a search on google, I found a couple of websites that may help. The cfhub site also seems to have some relevant articles to some of the past threads you have posted:
http://cfhub.com/examples/secure/
https://www.webapps.ccs.uoguelph.ca/start/authenticate.html
http://cfhub.com/examples/
Hope this helps. :)
helLO 11-25-2002, 09:10 AM I got the codes for the checking password and user name... But I would not like to allow user to jump page... (Means that the user know the address for menu page and jump directly to the menu page without logging in)
I would like to show a fake address instead of the real address...
Thanks...
Roelf 11-25-2002, 09:46 AM Then you have to create your pages a little different: in every page you should check if the user is logged in or not (can be done with an include), if the user is logged in, show the page, otherwise redirect to the login page with the requested page as an url-parameter, after liggong in, redirect to the originally requested page
helLO 11-25-2002, 09:48 AM Using coldfusion to do it? How? How do i do it?
Roelf 11-25-2002, 09:54 AM I dont speak coldfusion, but did you read the info on the links whammy posted? There should be info there on how to accomplish the functionality you need. It can be done in ASP/VBscript or ASP/JScript so i assume it can be done in CF too. but maybe im a fool thinking that
helLO 11-25-2002, 09:55 AM Using coldfusion to do it? How? How do i do it?
helLO 11-25-2002, 09:57 AM The websites whammy gave me is some kind like check for correct password and usename, right?
Roelf 11-25-2002, 09:59 AM i dont know, i didnt read them. But i assumed you did. So, if there is no info... maybe you should do a search in google yourself and see what comes up.....
Roelf 11-25-2002, 10:00 AM hmmm,just took a quick peek, the second link: this one https://www.webapps.ccs.uoguelph.ca/start/authenticate.html should give you some help. I just read quickly, but the description told me this could be of use
I made a simple site a few months back in which the purpose was for me to learn how to make a half-decent login system with CF, You need to as someone already mentioned check if the user is logged in on every page.
So you wirte a bit of code that checks if the user has logged in or not and include it in all pages you want to be secure.
For instance I have a file called check.cfm which has the following:
<CFSET bLoggedIn = False>
<CFIF IsDefined("Session.userID")>
<CFIF Session.userID neq "">
<CFSET bLoggedIn = True>
</CFIF>
<CFELSE>
<CFIF IsDefined("Cookie.userID")>
<CFIF Cookie.userID neq "">
<CFSET Session.userID = Cookie.userID>
<CFSET bLoggedIn = True>
</CFIF>
</CFIF>
</CFIF>
<CFIF bLoggedIn eq False>
<CFLOCATION url="login.cfm"> // If user is not logged send them back to login page
<CFEXIT>
</CFIF>
then I just include that file on every secure page with this
<CFINCLUDE template="check.cfm">
another good tutorial that helped me:
Creating a User Login Feature with ColdFusion (http://hotwired.lycos.com/webmonkey/00/48/index2a.html?tw=programming)
helLO 11-26-2002, 01:40 AM I could not log into my website with my usual password and user name after putting every page with this code :
<CFINCLUDE template="Check.cfm">
What should i do?
Um, that was just my example. It works with my setup but probably not with yours until you modify it, I don't know how your login system works? cookies? checking against DB etc?
Could you possibly attach or post your files?
helLO 11-26-2002, 02:27 AM these r the files...
in your database table called 'cf_user' you have a primary key ? and ID for each user?
i.e usually there would be something like
cf_user table
_ID______USER______PASS_____
1.............john................sdf35......
2.............mike...............hoty12@..
3......etc
4
5
what is the ID field called in your database?
helLO 11-26-2002, 04:03 AM I don't have a primary key... Do I need 1?
well, yeah it's a pretty good idea to have one. ;) It acts like the identifier, unique for each user(table record).
is it mySQL database?
you'll need to add an 'ID' field to your database table (make sure you specify 'AUTO_INCREMENT') adding this column only takes a moment.
O.k some of the code on your application.cfm looks wierd to me but anyway, I just added a few lines to the 'loginCheck.cfm' and made a 'check.cfm' file.
If user /pass are correct then it sets a cookie/session variable containing the 'ID' for that user. Then if you were to add this line:
<CFINCLUDE template="check.cfm">
to all pages you want to be 'secure' it might work.
helLO 11-26-2002, 05:28 AM I tried the files u gave me... It makes not much different compared to my old 1... I still can skip the login page and go striaght to my menu page...
I have added a primary key in my database called ID...
I know, as I said I only added 2 lines of code to your 'loginCheck.cfm' and created a small file called 'check.cfm'
I still can skip the login page and go straight to my menu page...
did you put <CFINCLUDE template="check.cfm"> in the menu.cfm page?
I have added a primary key in my database called ID...
So in the 'ID' column for the first 2 records it has 1, 2? and that 'ID' column number increases automatically for each record?
helLO 11-26-2002, 07:55 AM Yes, I put <CFINCLUDE template="check.cfm"> in the menu page?
Yes... the column - ID increased when i add another user and password...
:o :p
open up 'check.cfm' and change this:
<CFIF bLoggedIn eq False>
<CFLOCATION url="menu.cfm">
<CFEXIT>
</CFIF>
to this:
<CFIF bLoggedIn eq False>
<CFLOCATION url="main.cfm">
<CFEXIT>
</CFIF>
helLO 11-27-2002, 10:24 AM I'm still stuck...
When i put this - <CFINCLUDE template="check.cfm">
I'm kind of lock... I can't even access my menu page with my usual password and user...
Hmmm..
<cflock timeout="30"
throwontimeout="yes"
name="server"
type="exclusive">
<cfif not #ISDEFINED("server.sesssion")#>
<cfset server.season ="spring time">
</cfif>
</cflock>
^ That was on your application.cfm. What is for ?
[ ?updated version of files + database field names? ]
whammy 12-02-2002, 02:57 AM :eek:
still waiting on updated version of files + database field names.
|