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:

showcart context? (1998) WebCatalog-3.0800 on Mac OS X Server (2000) Emailer [cart] file names (1997) Conversion Database Blues (2001) Unable to view next 101-200 (1997) Sorting by date (1997) Poll Please (2002) RE: shrink-wrapped version out yet? (1997) too many nested tags ... (1997) NetForms for mail, sorry (1998) docs for WebCatalog2 (1997) [WebDNA] Strange error (2014) Product Comparison (2000) Multi Actions (1999) Inventory? (2000) Apache 2.0 incompatible? (2005) Non-Cart Files in Shopping Cart Folder (1997) if else problem (2003) Text data with spaces in them... (1997) no [search] with NT (1997)