/    Sign up×
Community /Pin to ProfileBookmark

Password Cookie problem

I am trying to use the javascript found on this page:
[url]http://javascript.internet.com/passwords/cookie-in.html[/url]

The login page works, but the members only page doesn’t work. It lets in people who don’t have the cookie. And there is a “Done, but with errors on page” message.

What is wrong with the coding of this page that is supposed to be members only?:
[url]http://www.web-magnets.com/negativesound/listening.html[/url]

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@agent_x91Oct 08.2004 — Cookies are an insecure way of making a members-only page. I'll take a look at both of the scripts for you.
Copy linkTweet thisAlerts:
@webmagnetsauthorOct 08.2004 — I am not looking for much security. I am only trying to get normal people to have to register.

Thank you very much for your time and effort.
Copy linkTweet thisAlerts:
@agent_x91Oct 08.2004 — in that case, a cookie should be sufficient, yes. But why force them to register?
Copy linkTweet thisAlerts:
@agent_x91Oct 08.2004 — there is also the problem that a lot of people wipe their cookies regularly.
Copy linkTweet thisAlerts:
@webmagnetsauthorOct 08.2004 — With this script all they would have to do is login again. I just want to make it so that if someone hasn't registered, they can't see my page listening.html

Did you see any coding problems?
Copy linkTweet thisAlerts:
@agent_x91Oct 08.2004 — I couldn't see any, but I only skimmed the code. I suggest making a new one instead of relying on the one on the website.
Copy linkTweet thisAlerts:
@webmagnetsauthorOct 08.2004 — Can you check the code on listening.html and see why it doesn't redirect you (since you don't have the cookie) to login.html?
Copy linkTweet thisAlerts:
@agent_x91Oct 08.2004 — I rarely use cookies, so my knowledge on them is slightly limited.

the script uses [I]GetCookie()[/I], which I'm not familiar with. You'll have to ask someone else about this.

Plus, you said the status of the page says you have an error, but it hasn't found any problems when I enter the page.


By the way, it is very likely that the cookie will be automatically blocked. I tried to use one on my website before and it was blocked.
Copy linkTweet thisAlerts:
@webmagnetsauthorOct 08.2004 — Can anyone else help me with this problem?
Copy linkTweet thisAlerts:
@agent_x91Oct 08.2004 — It would seem not.?
×

Success!

Help @webmagnets spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.11,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...