Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: CGI - variables from first form to be seen in third form.

by FalseVinylShrub (Chaplain)
on Nov 24, 2009 at 03:48 UTC ( #808989=note: print w/replies, xml ) Need Help??

in reply to CGI - variables from first form to be seen in third form.


Hope this will be of help:

  • If you are actually trying to make something secure, you should probably look for a ready-made module. Sorry, I don't know what's considered the best at the moment, you'll have to do some research or wait for someone else to recommend one.
  • On the login page, you seem to be checking the username (email address) then checking to see if there is an account with the specified password. Surely you need to check that the password belongs to that user: it looks like you can log into anyones account with your password at the moment. Need to pull out the password from the submitted email address, then check it is equal to the password submitted in the login form.
  • To solve the problem you asked about, and anything else that needs password protection, you'll need to keep track of logged in users between pages. You can't just pass round the username, or anyone will be able to access any account by changing the URL/cookie/etc. One way to do this would be to generate a session cookie and keep a record of which account it belongs to. Managing all this is quite complex and I would recommend finding a module.

Anyway depends exactly what you're doing but if you want some kind of security better do some research. Hope someone who knows more than me will provide more useful details..


  • Comment on Re: CGI - variables from first form to be seen in third form.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://808989]
and cookies bake in the oven...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2018-06-22 13:25 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.