Fix "post-redirect" not working when one of the parameters is named "submit".
It appears that there is some special processing of elements named "submit" when triggering form-submit through javascript. This patch adds a workaround for that. Thanks to Christian Gijtenbeek for finding and fixing this bug! git-svn-id: http://simplesamlphp.googlecode.com/svn/trunk@3024 44740490-163a-0410-bde0-09ae8108e29a
This commit is contained in:
parent
f4aabe3246
commit
fe8e1c4d6a
|
@ -5,13 +5,17 @@
|
|||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title>POST data</title>
|
||||
</head>
|
||||
<body onload="document.forms[0].submit()">
|
||||
<body onload="document.getElementsByTagName('input')[0].click();">
|
||||
|
||||
<noscript>
|
||||
<p><strong>Note:</strong> Since your browser does not support JavaScript, you must press the button below once to proceed.</p>
|
||||
</noscript>
|
||||
|
||||
<form method="post" action="<?php echo htmlspecialchars($this->data['destination']); ?>">
|
||||
<!-- Need to add this element and call click method, because calling submit()
|
||||
on the form causes failed submission if the form has another element with name or id of submit.
|
||||
See: https://developer.mozilla.org/en/DOM/form.submit#Specification -->
|
||||
<input type="submit" style="display:none;" />
|
||||
<?php
|
||||
if (array_key_exists('post', $this->data)) {
|
||||
$post = $this->data['post'];
|
||||
|
|
Reference in New Issue