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:

[WebDNA] Fwd: RETS... HELP! (2009) Word Breaks (1998) test (2004) Signal Raised (1997) WC2.0 Memory Requirements (1997) international time (1997) Email Problem (2006) Still Stumped on ShowNext...HELP! (1997) Grep (2003) Sitebuilder (2004) WebCat on 10.0.4 - iTools 6.0 (2001) Time Remaining? (1998) Math, Multiple Equasions and Show/Hide (1998) Problems with [Applescript] (1997) Semi-OT: [Mimeheader] and flash (2002) Email Set-Up? (1997) Comments in db? (1997) Multiple security dbs (1997) Repost: Upload file limits (2000) For those of you not on the WebCatalog Beta... (1997)