Session timeout/security code...

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 35562
interpreted = N
texte = Could someone have a quick look at this and see if they can better it?I need a session timeout of 20mins with some sort of security. When the user enters the site using the username and password, i write a entry to the session.db with DATESTAMP ([date %m%d%Y%H%M%S]), USERID ([id] - from username/password lookup) and SESSIONID ([sid] = [cart]). The only way the session.db entry can be written is if the user gets the username and password correct. and then there is a 20 timeout. I can't use cookies for this (unfortunatly).<--[hideif [lookup db=logs/session.db&value=[sid]&lookinfield=sid&returnfield=id]=[id]][redirect Logout.html][/hideif][text show=f]sessiondatestamp=[lookup db=logs/session.db&value=[sid]&lookinfield=sid&returnfield=datestamp][/text][text show=f]lastsessiontime=[getchars start=9&end=10][sessiondatestamp][/getchars]:[getchars start=11&end=12][sessiondatestamp][/getchars]:[getchars start=13&end=14][sessiondatestamp][/getchars][/text][text show=f]lastsessiondate=[getchars start=3&end=4][sessiondatestamp][/getchars]/[getchars start=1&end=2][sessiondatestamp][/getchars]/[getchars start=5&end=8][sessiondatestamp][/getchars][/text][text show=f]lastsessionnum=[math]({[lastsessiondate]}*86400)+{[lastsessiontime]}[/math][/text][text show=f]currentsessionnum=[math]({[date]}*86400)+{[time]}[/math][/text][text show=f]difference=[math][currentsessionnum]-[lastsessionnum][/math][/text][showif [difference]>1200][redirect Logout.html][/showif][replace db=logs/session.db&eqIDdatarq=[id]&&eqSIDdatarq=[sid]]datestamp=[date %m%d%Y%H%M%S][/replace]-->Thanx-- Simon Buchanan,Technical Design and Administration New Media Communications --------------------------------------------------------------- http://www.newmediacom.net mailto:simon@newmediacom.net------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Session timeout/security code... (Simon Buchanan 2000)
Could someone have a quick look at this and see if they can better it?I need a session timeout of 20mins with some sort of security. When the user enters the site using the username and password, i write a entry to the session.db with DATESTAMP ([date %m%d%Y%H%M%S]), USERID ([id] - from username/password lookup) and SESSIONID ([sid] = [cart]). The only way the session.db entry can be written is if the user gets the username and password correct. and then there is a 20 timeout. I can't use cookies for this (unfortunatly).<--[hideif [lookup db=logs/session.db&value=[sid]&lookinfield=sid&returnfield=id]=[id]][redirect Logout.html][/hideif][text show=f]sessiondatestamp=[lookup db=logs/session.db&value=[sid]&lookinfield=sid&returnfield=datestamp][/text][text show=f]lastsessiontime=[getchars start=9&end=10][sessiondatestamp][/getchars]:[getchars start=11&end=12][sessiondatestamp][/getchars]:[getchars start=13&end=14][sessiondatestamp][/getchars][/text][text show=f]lastsessiondate=[getchars start=3&end=4][sessiondatestamp][/getchars]/[getchars start=1&end=2][sessiondatestamp][/getchars]/[getchars start=5&end=8][sessiondatestamp][/getchars][/text][text show=f]lastsessionnum=[math]({[lastsessiondate]}*86400)+{[lastsessiontime]}[/math][/text][text show=f]currentsessionnum=[math]({[date]}*86400)+{[time]}[/math][/text][text show=f]difference=[math][currentsessionnum]-[lastsessionnum][/math][/text][showif [difference]>1200][redirect Logout.html][/showif][replace db=logs/session.db&eqIDdatarq=[id]&&eqSIDdatarq=[sid]]datestamp=[date %m%d%Y%H%M%S][/replace]-->Thanx-- Simon Buchanan,Technical Design and Administration New Media Communications --------------------------------------------------------------- http://www.newmediacom.net mailto:simon@newmediacom.net------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Simon Buchanan

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Auto Delete EmailCompleted Files (2002) WebCat2 - Getting to the browser's username/password data (1997) Prices coming up 0.00 (2001) two unique banners on one page (1997) IE4.5 bug FYI (1999) WebCat2b15MacPlugin - showing [math] (1997) protect acting looney?? (2003) New Site Announcement (1998) won't serve .tpl (2000) multiple credit card merchant accounts/processors (1997) [append] (1998) WC2f3 (1997) No Line Breaks Appearing (2000) XMLNodes Error (2007) [WebDNA] PayPal Instant Payment Notification Guide (2009) Netscape Cache and Linux (2001) [WebDNA] [store] and [recall]: default db location (2015) Summing fields (1997) The List is Changing (1997) Dates (1996)