diff options
author | Ivan Kohler <ivan@freeside.biz> | 2018-10-01 12:03:01 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2018-10-01 12:03:01 -0700 |
commit | d5988a9f7a3617de33da3058f2e9f1151b24420e (patch) | |
tree | 3ed8d80cd6a81f160c76c90fcf089e81fe7ffddf /httemplate/misc/edge_browser_check-iframe.html | |
parent | 1ab515df162a76347d8146cae4ff34656cc4bcd3 (diff) | |
parent | b6088672c87e2c5984183326b4c0e2d9bd6c34f6 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/misc/edge_browser_check-iframe.html')
-rw-r--r-- | httemplate/misc/edge_browser_check-iframe.html | 34 |
1 files changed, 34 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..61ae9a0bd --- /dev/null +++ b/httemplate/misc/edge_browser_check-iframe.html @@ -0,0 +1,34 @@ +<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; +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' ? $sessionkey : 'Y', + ); +} + +</%init>
\ No newline at end of file |