From ivan at freeside.biz Tue Jul 18 12:05:37 2023 From: ivan at freeside.biz (Ivan Kohler) Date: Tue, 18 Jul 2023 12:05:37 -0700 Subject: [freeside-commits] branch FREESIDE_3_BRANCH updated. a39cce659ce5811bc6d061c6db7e16ac1bcc4c45 Message-ID: <20230718190539.826C41C20219@jumptail.freeside.biz> The branch, FREESIDE_3_BRANCH has been updated via a39cce659ce5811bc6d061c6db7e16ac1bcc4c45 (commit) from 06c319d7acbb4d469c985a83965f340d7435da65 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a39cce659ce5811bc6d061c6db7e16ac1bcc4c45 Author: Ivan Kohler Date: Tue Jul 18 12:05:33 2023 -0700 v3: prevent CARD/CHEK customers from inadvertantly going off auto-pay making an early manual payment, RT#87429 diff --git a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html index 1183b2ba0..8b5908ef0 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_ach_payment.html @@ -35,11 +35,42 @@ EOF $OUT .= ''; } } else { - $OUT .= ''; - $OUT .= 'Remember this information'; - $OUT .= ''; - $OUT .= 'Charge future payments to this account automatically'; + + my $save_ck = $save_unchecked ? '' : 'CHECKED'; + my $auto_ck = $payby eq 'CHEK' ? ' CHECKED' : ''; + + if ( $payby eq 'CHEK' && ! $save_unchecked ) { + + $OUT .=< + + + + Remember this information, and charge future payments to this account automatically + + +EOF + + } else { + + $OUT .=< + + + Remember this information + + + + + Charge future payments to this account automatically + + +EOF + + } + } + %> diff --git a/fs_selfservice/FS-SelfService/cgi/make_payment.html b/fs_selfservice/FS-SelfService/cgi/make_payment.html index 503901edd..b14c901fd 100644 --- a/fs_selfservice/FS-SelfService/cgi/make_payment.html +++ b/fs_selfservice/FS-SelfService/cgi/make_payment.html @@ -35,17 +35,43 @@ EOF <%= include('card') %> - - - NAME="save" VALUE="1"> - Remember this card and billing address - - - - NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> - Charge future payments to this card automatically - - + +<%= + +my $save_ck = $save_unchecked ? '' : 'CHECKED'; +my $auto_ck = $payby eq 'CARD' ? ' CHECKED' : ''; + +if ( $payby eq 'CARD' && ! $save_unchecked ) { + + $OUT .=< + + + + Remember this card and billing address, and charge future payments to this card automatically + + +EOF + +} else { + + $OUT .=< + + + Remember this card and billing address + + + + + Charge future payments to this card automatically + + +EOF + +} +%> +
----------------------------------------------------------------------- Summary of changes: .../FS-SelfService/cgi/make_ach_payment.html | 39 ++++++++++++++++-- .../FS-SelfService/cgi/make_payment.html | 48 +++++++++++++++++----- 2 files changed, 72 insertions(+), 15 deletions(-) From ivan at freeside.biz Tue Jul 18 16:28:59 2023 From: ivan at freeside.biz (Ivan Kohler) Date: Tue, 18 Jul 2023 16:28:59 -0700 Subject: [freeside-commits] branch master updated. 5736b748338a6737f6c24c063b724ebdb77fb79f Message-ID: <20230718232901.AD0391C20219@jumptail.freeside.biz> The branch, master has been updated via 5736b748338a6737f6c24c063b724ebdb77fb79f (commit) from 69fdc0a65143c0880990cbb66a068c0442ba7f70 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5736b748338a6737f6c24c063b724ebdb77fb79f Author: Ivan Kohler Date: Tue Jul 18 16:28:58 2023 -0700 default to a session cookie instead of setting an explicit timeout, weird timezone/clock skew effects on server can cause firefox and other browsers to reject the session cookie, leading to silent login failures diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 383fb0e88..57a886770 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -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', }, diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index 6eab11dae..b1fea7da2 100755 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -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' ) { ----------------------------------------------------------------------- Summary of changes: FS/FS/Conf.pm | 4 ++-- fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) From ivan at freeside.biz Tue Jul 18 16:29:02 2023 From: ivan at freeside.biz (Ivan Kohler) Date: Tue, 18 Jul 2023 16:29:02 -0700 Subject: [freeside-commits] branch FREESIDE_4_BRANCH updated. 379df33385e9519bd43abc0f976e3d170072ad7c Message-ID: <20230718232904.7F1191C2024B@jumptail.freeside.biz> The branch, FREESIDE_4_BRANCH has been updated via 379df33385e9519bd43abc0f976e3d170072ad7c (commit) from b07fc5121e081be276cd7ed8ea0a030b4c2b06e7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 379df33385e9519bd43abc0f976e3d170072ad7c Author: Ivan Kohler Date: Tue Jul 18 16:29:01 2023 -0700 default to a session cookie instead of setting an explicit timeout, weird timezone/clock skew effects on server can cause firefox and other browsers to reject the session cookie, leading to silent login failures diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 657f38d38..98de8da98 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2476,8 +2476,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', }, diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi index 779ef3357..5cf0fa0a1 100755 --- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi +++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi @@ -1252,10 +1252,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' ) { ----------------------------------------------------------------------- Summary of changes: FS/FS/Conf.pm | 4 ++-- fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)