From fe293dc0ca4ea3939de9c2ad28d3aaf7c8980644 Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Wed, 12 Sep 2018 23:32:52 -0400 Subject: RT# 80624 Detect and warn for bad MS Edge version --- httemplate/misc/edge_browser_check-iframe.html | 35 ++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 httemplate/misc/edge_browser_check-iframe.html (limited to 'httemplate/misc/edge_browser_check-iframe.html') diff --git a/httemplate/misc/edge_browser_check-iframe.html b/httemplate/misc/edge_browser_check-iframe.html new file mode 100644 index 000000000..e804fc676 --- /dev/null +++ b/httemplate/misc/edge_browser_check-iframe.html @@ -0,0 +1,35 @@ +
+ + + +
+ + + + +<%init> +my $cgi = FS::UID::cgi(); +my $curuser = $FS::CurrentUser::CurrentUser; + +if ( $curuser ) { + my $canary = $cgi->param('edge_browser_canary'); + $curuser->set_pref( + 'edge_bug_vulnerable', + + $canary eq 'test' ? 'Y' : 'Y', + + # Don't test this user's session for the next 10m + time() + 600, + ); +} + + \ No newline at end of file -- cgit v1.2.1 From 0682747829a56d487155e28675c133cb90f991de Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Thu, 13 Sep 2018 00:44:54 -0400 Subject: RT# 80624 Browser check repeats if session changes --- httemplate/misc/edge_browser_check-iframe.html | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'httemplate/misc/edge_browser_check-iframe.html') diff --git a/httemplate/misc/edge_browser_check-iframe.html b/httemplate/misc/edge_browser_check-iframe.html index e804fc676..61ae9a0bd 100644 --- a/httemplate/misc/edge_browser_check-iframe.html +++ b/httemplate/misc/edge_browser_check-iframe.html @@ -19,16 +19,15 @@ <%init> my $cgi = FS::UID::cgi(); my $curuser = $FS::CurrentUser::CurrentUser; +my $session = $FS::CurrentUser::CurrentSession; +my $sessionkey = $session->sessionkey if $session; if ( $curuser ) { my $canary = $cgi->param('edge_browser_canary'); $curuser->set_pref( 'edge_bug_vulnerable', - $canary eq 'test' ? 'Y' : 'Y', - - # Don't test this user's session for the next 10m - time() + 600, + $canary eq 'test' ? $sessionkey : 'Y', ); } -- cgit v1.2.1