default to a session cookie instead of setting an explicit timeout, weird timezone... master
authorIvan Kohler <ivan@freeside.biz>
Tue, 18 Jul 2023 23:28:58 +0000 (16:28 -0700)
committerIvan Kohler <ivan@freeside.biz>
Tue, 18 Jul 2023 23:28:58 +0000 (16:28 -0700)
FS/FS/Conf.pm
FS/FS/deploy_zone.pm
fs_selfservice/FS-SelfService/cgi/selfservice.cgi

index 383fb0e..57a8867 100644 (file)
@@ -2452,8 +2452,8 @@ and customer address. Include units.',
 
   {
     'key'         => 'selfservice-timeout',
-    'section'     => 'self-service',
-    'description' => 'Timeout for the self-service login cookie, in seconds.  Defaults to 1 hour.',
+    'section'     => 'deprecated',
+    'description' => 'Deprecated.  Was the timeout for the self-service login cookie, in seconds.  Defaulted to 1 hour.',
     'type'        => 'text',
   },
 
index 16ba5dd..c618fb9 100644 (file)
@@ -13,8 +13,7 @@ use HTTP::Request::Common;
 use Geo::JSON::Polygon;
 use Geo::JSON::Feature;
 
-# update this in 2020, along with the URL for the TIGERweb service
-our $CENSUS_YEAR = 2010;
+our $CENSUS_YEAR = 2020;
 
 our $tech_label  = FS::part_pkg_fcc_option->technology_labels;
 
@@ -457,7 +456,7 @@ sub process_block_lookup {
     inSR            => 4326,
     outSR           => 4326,
     spatialRel      => 'esriSpatialRelIntersects', # the test to perform
-    outFields       => 'OID,GEOID',
+    outFields       => 'GEOID',
     returnGeometry  => 'false',
     orderByFields   => 'OID',
   );
@@ -481,16 +480,12 @@ sub process_block_lookup {
 
   #warn "Census block lookup: $count\n";
 
-  # we have to do our own pagination on this, because the census bureau
-  # doesn't support resultOffset (maybe they don't have ArcGIS 10.3 yet).
-  # that's why we're ordering by OID, it's globally unique
-  my $last_oid = 0;
   my $done = 0;
   while (!$done) {
     $response = $ua->request(
       POST $url, Content => [
         %query,
-        where => "OID>$last_oid",
+        resultOffset => $inserted,
       ]
     );
     die $response->status_line unless $response->is_success;
@@ -515,7 +510,6 @@ sub process_block_lookup {
     }
 
     #warn "Inserted $inserted records\n";
-    $last_oid = $data->{features}[-1]{attributes}{OID};
     $done = 1 unless $data->{exceededTransferLimit};
   }
 
index 6eab11d..b1fea7d 100755 (executable)
@@ -1250,10 +1250,8 @@ sub do_template {
   $fill_in->{$_} = $access_info->{$_} foreach keys %$access_info;
 
   # update the user's authentication
-  my $timeout = $access_info->{'timeout'} || '3600';
   my $cookie = CGI::Cookie->new('-name'     => 'session',
                                 '-value'    => $session_id,
-                                '-expires'  => '+'.$timeout.'s',
                                 #'-secure'   => 1, # would be a good idea...
                                );
   if ( $name eq 'logout' ) {