Skip to content

Commit

Permalink
Merge pull request #36286 from nextcloud/bugfix/noid/fix-sending-stat…
Browse files Browse the repository at this point in the history
…e-token-in-flowv1

Fix event listener race condition on login-form
  • Loading branch information
kesselb authored Feb 7, 2023
2 parents 5a48768 + bbb490d commit 36347cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/js/login/authpicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ jQuery(document).ready(function() {
e.preventDefault();
document.location.href = e.target.attributes.action.value
})

$('#login-form input').removeAttr('disabled');
})
2 changes: 1 addition & 1 deletion core/templates/loginflow/authpicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<p id="redirect-link">
<form id="login-form" action="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], 'direct' => $_['direct']])) ?>" method="get">
<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>" disabled>
</form>
</p>

Expand Down
2 changes: 1 addition & 1 deletion core/templates/loginflowv2/authpicker.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

<p id="redirect-link">
<form id="login-form" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.grantPage', ['stateToken' => $_['stateToken'], 'user' => $_['user']])) ?>" method="get">
<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>">
<input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>" disabled>
</form>
</p>

Expand Down

0 comments on commit 36347cb

Please sign in to comment.