summaryrefslogtreecommitdiff
path: root/httemplate/misc/edge_browser_check-iframe.html
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-09-25 19:17:21 -0700
committerIvan Kohler <ivan@freeside.biz>2018-09-25 19:17:21 -0700
commit97656ea6ea7a9138036ba1499a05d64a1f8850c6 (patch)
treeacc870e858d45b93883dd211877a5335010ab2f2 /httemplate/misc/edge_browser_check-iframe.html
parent8c914e2614a40b95291df00d0b8dbd5766f611b5 (diff)
parentb932d7d067c6f3d917f9da3efe6b9ab7fd23ab8e (diff)
Merge branch 'FREESIDE_3_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_3_BRANCH
Diffstat (limited to 'httemplate/misc/edge_browser_check-iframe.html')
-rw-r--r--httemplate/misc/edge_browser_check-iframe.html35
1 files changed, 35 insertions, 0 deletions
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 @@
+<form id="canary-form" action="<% $fsurl %>misc/edge_browser_check-iframe.html" method="POST">
+<input type="text" id="canary-result" value="<% scalar $cgi->param('edge_browser_canary') %>">
+<select name="edge_browser_canary">
+ <option>test
+ <option>test
+</select>
+<input id="canary-submit" type="submit">
+</form>
+
+<script type="text/javascript" src="<% $fsurl %>elements/jquery.js"></script>
+<script type="text/javascript">
+ $( function() {
+ if ( ! $("#canary-result").val() ) {
+ $("#canary-form").submit();
+ }
+ });
+</script>
+
+<%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,
+ );
+}
+
+</%init> \ No newline at end of file