From: Mitch Jackson Date: Thu, 13 Sep 2018 03:32:52 +0000 (-0400) Subject: RT# 80624 Detect and warn for bad MS Edge version X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=95e61b65bcf59209181fec43d760210a3846ce26 RT# 80624 Detect and warn for bad MS Edge version --- diff --git a/httemplate/elements/header.html b/httemplate/elements/header.html index c6b10e301..6df45fb07 100644 --- a/httemplate/elements/header.html +++ b/httemplate/elements/header.html @@ -4,3 +4,4 @@ % } else { <& header-full.html, @_ &> % } +<& /misc/edge_browser_check-header.html &> diff --git a/httemplate/misc/edge_browser_check-fail_notice.html b/httemplate/misc/edge_browser_check-fail_notice.html new file mode 100644 index 000000000..fb42ffe8e --- /dev/null +++ b/httemplate/misc/edge_browser_check-fail_notice.html @@ -0,0 +1,25 @@ +<& /elements/header.html, "Edge browser bug" &> + +
+
+ ⚠ +
+

+ Edge Browser Bug +

+

+ Your copy of Microsoft Edge has a data corrupting bug. +

+

+ Microsoft fixed this bug with the July RS4 Windows 10 Update. + Please update your copy of Windows. +

+

+ Alternatively, you may choose to use + Mozilla Firefox + or Google Chrome. They + are not affected by this bug. +

+
+ +<& /elements/footer.html &> \ No newline at end of file diff --git a/httemplate/misc/edge_browser_check-header.html b/httemplate/misc/edge_browser_check-header.html new file mode 100644 index 000000000..4d36de598 --- /dev/null +++ b/httemplate/misc/edge_browser_check-header.html @@ -0,0 +1,32 @@ +% if ( $force_redirect ) { + +% } +% if ( $do_check ) { + + +% } +<%init> +my $curuser = $FS::CurrentUser::CurrentUser; +my $cgi = FS::UID::cgi(); +my $DEBUG = 0; + +my $do_check = 0; +$do_check = 1 + if $curuser + && $curuser->get_pref('edge_bug_vulnerable') ne 'N'; + +my $force_redirect = $curuser->get_pref('edge_bug_vulnerable') eq 'Y' ? 1 : 0; + \ No newline at end of file diff --git a/httemplate/misc/edge_browser_check-iframe.html b/httemplate/misc/edge_browser_check-iframe.html new file mode 100644 index 000000000..da411c69e --- /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' ? 'N' : 'Y', + + # Don't test this user's session for the next 5m + time() + 300, + ); +} + + \ No newline at end of file