summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDaniel <mail@danielkesselberg.de>2023-02-07 11:02:04 +0100
committerGitHub <noreply@github.com>2023-02-07 11:02:04 +0100
commit36347cb2cba27b216d8802ac352de54d0dd9a18f (patch)
treeef90764624f7676853d257c2037ad48591797f2b /core
parent5a487686034a04fdf921967a541c9c06747d3855 (diff)
parentbbb490de5ea22c50e08b9fa8c788ae7ba7de8e20 (diff)
downloadnextcloud-server-36347cb2cba27b216d8802ac352de54d0dd9a18f.tar.gz
nextcloud-server-36347cb2cba27b216d8802ac352de54d0dd9a18f.zip
Merge pull request #36286 from nextcloud/bugfix/noid/fix-sending-state-token-in-flowv1
Fix event listener race condition on login-form
Diffstat (limited to 'core')
-rw-r--r--core/js/login/authpicker.js2
-rw-r--r--core/templates/loginflow/authpicker.php2
-rw-r--r--core/templates/loginflowv2/authpicker.php2
3 files changed, 4 insertions, 2 deletions
diff --git a/core/js/login/authpicker.js b/core/js/login/authpicker.js
index 8aaaf3d7361..1a94b02d72f 100644
--- a/core/js/login/authpicker.js
+++ b/core/js/login/authpicker.js
@@ -10,4 +10,6 @@ jQuery(document).ready(function() {
e.preventDefault();
document.location.href = e.target.attributes.action.value
})
+
+ $('#login-form input').removeAttr('disabled');
})
diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php
index 68c53818a92..3f78081921d 100644
--- a/core/templates/loginflow/authpicker.php
+++ b/core/templates/loginflow/authpicker.php
@@ -47,7 +47,7 @@ $urlGenerator = $_['urlGenerator'];
<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>
diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php
index b7ff617bd30..0e18cc99ce1 100644
--- a/core/templates/loginflowv2/authpicker.php
+++ b/core/templates/loginflowv2/authpicker.php
@@ -47,7 +47,7 @@ $urlGenerator = $_['urlGenerator'];
<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>