Skip to content

Commit c0c94da

Browse files
committed
Hotfix: Remove Character Limit
Remove Character Limit from Passkey Input on Handshake
1 parent 49a05d7 commit c0c94da

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

resources/views/partials/gateway/handshake.blade.php

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
<div class="wrapper">
77

88
<div class="container">
9-
9+
1010
<div class="slide" data-index="1">
1111
<h3>{{ $translation["HS_EnterPasskeyMsg"] }}</h3>
12-
12+
1313
<form id="passkey-form" autocomplete="off">
1414

1515
<div class="password-input-wrapper">
@@ -52,7 +52,7 @@ class="passkey-input"
5252
<div class="nav-buttons">
5353
<button onclick="extractPasskey()" class="btn-lg-fill align-end">{{ $translation["Continue"] }}</button>
5454
</div>
55-
55+
5656
<p class="red-text" id="backup-alert-message"></p>
5757
<button onclick="switchSlide(4)" class="btn-md">{{ $translation["HS_ForgottenBackup"] }}</button>
5858

@@ -121,22 +121,6 @@ class="passkey-input"
121121
const rand = generateTempHash();
122122
input.setAttribute('name', rand);
123123
124-
// Input filter for allowed characters
125-
input.addEventListener('beforeinput', function (event) {
126-
if (event.inputType.startsWith('insert')) {
127-
if (!/^[A-Za-z0-9!@#$%^&*()_+-]+$/.test(event.data)) {
128-
event.preventDefault();
129-
console.log('bad input');
130-
input.parentElement.style.border = '1px solid red'
131-
132-
setTimeout(() => {
133-
input.parentElement.style.border = 'var(--border-stroke-thin)';
134-
console.log('back');
135-
}, 100);
136-
}
137-
}
138-
});
139-
140124
// Handle Enter key
141125
input.addEventListener('keypress', function (event) {
142126
if (event.key === 'Enter') {
@@ -164,7 +148,7 @@ class="passkey-input"
164148
if(input.dataset.visible === 'false'){
165149
input.value = '*'.repeat(updated.length);
166150
}
167-
151+
168152
});
169153
170154
// Prevent copy/cut/paste
@@ -178,14 +162,14 @@ class="passkey-input"
178162
const icons = toggleBtn.querySelectorAll('svg');
179163
const eye = icons[0];
180164
const eyeOff = icons[1];
181-
165+
182166
const isVisible = input.dataset.visible === 'true';
183167
if (!isVisible) {
184168
input.value = real;
185169
eye.style.display = 'none';
186170
eyeOff.style.display = 'inline-block';
187171
input.dataset.visible = 'true';
188-
}
172+
}
189173
else {
190174
input.value = '*'.repeat(real.length);
191175
eye.style.display = 'inline-block';
@@ -202,4 +186,4 @@ class="passkey-input"
202186
</script>
203187

204188

205-
@endsection
189+
@endsection

0 commit comments

Comments
 (0)