]> lifelog.hopto.org Git - LifeLog.git/commitdiff
Session exp. times has to be validated not to be under 2 min.
authorWill Budicm <redacted>
Mon, 14 Dec 2020 11:35:12 +0000 (22:35 +1100)
committerWill Budicm <redacted>
Mon, 14 Dec 2020 11:35:12 +0000 (22:35 +1100)
Current Development Check List.md
htdocs/cgi-bin/wsrc/main.js

index 00eb816e94f75c271d43153227cd04fd94874cef..c99cd2c6aca576d4dfff1da6769795d8693aacf2 100644 (file)
@@ -6,12 +6,13 @@
 
 ### v.2.1 SUN STABLE New Features in Works
 
-* &#10004 PostgreSQL to be further tested. Implement server managed database.
-  * On errors sessions appear not to be closed by driver, maybe this is required and they expire?
-  * Not all sql has been translated or proper database everywhere established.
-* Session expired should disable the log entry form.
+* &#10004; Config. page set session expires times has to be validated not to be under 2 minutes.
 * Implement mapped provision of named timezones via main.inf, for towns not available in global list.
   * Javascript also needs to be updated to translate this properly.
+* &#10004; PostgreSQL to be further tested. Implement server managed database.
+  * On errors sessions appear not to be closed by driver, maybe this is required and they expire?
+  * Not all sql has been translated or proper database everywhere established.
+* &#10004; Session expired should disable the log entry form.
 * &#10004; Implement log text field limit setting.  0 - Unlimited, 1024 - Default n>128 as minimum size.
 * &#10004; System configuration variables should be sorted and listed by name and grouped by type. Anons presented at the bottom.
 * &#10004; Provide office share public link for main.inf linked categories, No login required but no log creation or search is possible.
index d0782b30fc791230da6c64f99a7538900ae1c7fb..1f3184b2b494c81668a6137516bf279f11713237 100644 (file)
@@ -1145,17 +1145,24 @@ function setPageSessionTimer(expires) {
             var timeout;
             var now = new moment();
             var val = expires.replace(/\+|[A-Z]|[a-z]/g, '');
+            
             if(expires.indexOf("h")>0){
                 timeout = moment(now).add(val, "h");
             }
             else
             if(expires.indexOf("m")>0){
+                if(val<2){val=2};
                 timeout = moment(now).add(val, "m");
             }
             else
             if(expires.indexOf("s")>0){
+               if(val<60){val=2}; 
                timeout = moment(now).add(val, "s");
             }
+            else{
+                if(val<2){val=2};
+                timeout = moment(now).add(val, "m");
+            }
 
                var timer   =  setInterval(function() {
                 var now = new moment();
@@ -1168,6 +1175,9 @@ function setPageSessionTimer(expires) {
                 if(now.isAfter(timeout)){
                     $("#sss_status").html("<span id='sss_expired'><a href='login_ctr.cgi'>Page Session has Expired!</a></span>");
                     clearInterval(timer);
+                    $("#ed").prop( "disabled", true );
+                    $("#el").prop( "disabled", true );
+                    $("#am").prop( "disabled", true );
                 }
 
                                         }, 1000);