Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump webpack from 5.88.2 to 5.94.0 in /oidc-ui #867

Open
wants to merge 51 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
a35edc0
Updated pom version to 1.4.0-SNAPSHOT (#612)
ase-101 Mar 19, 2024
91d2143
[ES-879] Implemented functionality to dynamically display subheader t…
gk-4VII Mar 21, 2024
5c74035
[FIXES] errorCode spelling mistake
zesu22 Mar 20, 2024
bb06f95
Merge pull request #618 from Infosys/bug/error_code
aranaravi Mar 26, 2024
a0acfe4
Replacing the (-) special character with empty in oidcTransactionId (…
aranaravi Mar 27, 2024
a3e7339
[ES-914] Fixed: OIDC-UI is not using the sbi.env config instead uses …
gk-4VII Mar 27, 2024
bdfcd98
[ES-914] Fixed: OIDC-UI is not using the sbi.env config instead uses …
gk-4VII Mar 27, 2024
4d10247
Merge pull request #624 from GurukiranP/ES914
aranaravi Mar 28, 2024
cf0a545
[ES-926] Fixed: In eSignet UI, Info in Username field is not clickabl…
gk-4VII Mar 29, 2024
17a5e08
[ADDED] reset captcha after api failure
zesu22 Apr 2, 2024
82a17cb
Merge pull request #629 from Infosys/bug/ES-927
aranaravi Apr 2, 2024
6094bcf
[ES-911] added Knowledge basesd configurationd details into readme fi…
kaifk468 Apr 2, 2024
045f52d
MOSIP-32194 (#633)
ase-101 Apr 2, 2024
f0d06bf
ES-911 (#639)
ase-101 Apr 4, 2024
ceaa414
Updated the latest error codes (#644)
ase-101 Apr 4, 2024
1bd1687
[MODIFIED] resetting captchaToken with recaptcha wigdet
zesu22 Apr 5, 2024
6848343
Merge pull request #649 from Infosys/bug_release/ES-938
aranaravi Apr 5, 2024
34e2cab
Revert "[MODIFIED] resetting captchaToken with recaptcha wigdet" (#651)
ase-101 Apr 5, 2024
fc4bd0c
Added DB upgrade scripts (#652)
ase-101 Apr 5, 2024
a6f4a63
ES-911 (#654)
ase-101 Apr 5, 2024
3a633f7
Release changes (#655)
ckm007 Apr 5, 2024
97c5c6c
Updated Pom versions for release changes (#656)
ckm007 Apr 11, 2024
1a1ebbc
Merged changes from develop to release branch for 1.4.1 release (#671)
ase-101 May 2, 2024
a7ff43b
ES-1125
ase-101 May 2, 2024
9b90d00
Merge pull request #672 from ase-101/r1411
ckm007 May 2, 2024
04bd733
ES-937
ase-101 May 5, 2024
2853a03
Merge pull request #678 from ase-101/r1411
ckm007 May 6, 2024
aac776d
[INJIWEB-130] add logic to skip id-field check with challenge (#682)…
balaji-alluru May 7, 2024
905f5e9
[ES-1136]: Fixed - When transaction expired in login page incorrect e…
gk-4VII May 15, 2024
19d6f0e
MOSIP-30868 Artifact id updated
Sohandey May 3, 2024
d6d90a0
[DSD-5071] Setu for apitest-esignet
VSIVAKALYAN May 5, 2024
0ecaa9a
[DSD-5071] Setup for apitest-esignet
VSIVAKALYAN May 6, 2024
7d16555
MOSIP-31134
ase-101 May 8, 2024
46e6346
ES-934
ase-101 May 13, 2024
6a5945c
MOSIP-31134
ase-101 May 13, 2024
494a913
ES-934
ase-101 May 20, 2024
8a2b417
[DSD-5071] Setup for apitest-esignet
VSIVAKALYAN May 9, 2024
b8a3afd
DSD-5071
Sohandey May 9, 2024
58aaf5a
DSD-5071
Sohandey May 10, 2024
2ce0555
MOSIP-33136
nandhu-kumar May 20, 2024
37be4c8
[MODIFIED] username type checking through new key (#675) (#710)
zesu22 May 21, 2024
23f2cbb
Merge pull request #709 from ase-101/release-141
ckm007 May 21, 2024
e946409
[MOSIP-33402] Updated chart-lint-publish.yml
Prafulrakhade Jun 4, 2024
3d36730
Merge pull request #746 from Prafulrakhade/release-1.4.x
ckm007 Jun 10, 2024
5069723
updated docker-compose with latest images (#760)
balaji-alluru Jun 10, 2024
d3927e5
[DSD-5447] Updated install.sh
Prafulrakhade Jun 11, 2024
8146a8c
Merge pull request #763 from Prafulrakhade/release-1.4.x
ckm007 Jun 11, 2024
bb37225
Release changes (#771)
ckm007 Jun 14, 2024
4a1055b
Update init_values.yaml
Prafulrakhade Jun 14, 2024
4c08c84
eSignet 1.4.1 release changes to master
ckm007 Jun 20, 2024
b18e8a8
Bump webpack from 5.88.2 to 5.94.0 in /oidc-ui
dependabot[bot] Aug 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[MODIFIED] username type checking through new key (#675) (#710)
Signed-off-by: Zeeshan Mehboob <zeeshan.mehboob@infosys.com>
  • Loading branch information
zesu22 authored May 21, 2024
commit 37be4c83163d45694d23eb81daf33484b0f9e6d9
70 changes: 41 additions & 29 deletions oidc-ui/src/components/InputWithImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,51 +49,63 @@ export default function InputWithImage({

const handleKeyDown = (e) => {

var keyCode = e.keyCode || e.which;

// number checking function checks if the key is a number or not
// restricting with shift + number key
const numberChecking = (key, shift) =>
(key >= 48 && key <= 57 && !shift) || (key >= 96 && key <= 105);

// letter checking function checks if the key is a letter or not
const letterChecking = (key) =>
(key >= 65 && key <= 90);
var keyCode = e.key || e.which;

// multiKeyChecking function checks if the key is
// ctrl + a, ctrl + c, ctrl + v
const multiKeyChecking = (key, ctrl) =>
ctrl && (key === 65 || key === 67 || key === 86);
// while pasting it will also check maxlength
const multiKeyChecking = (key, ctrl, maxLength) => {
if (
ctrl &&
(key === "a" || key === "c"
|| (key === "v" && checkMaxLength(maxLength)))
) {
return true;
}
return false;
};

// checking max length for the input
const checkMaxLength = (maxLength) =>
maxLength === "" ? true : e.target.value.length < parseInt(maxLength);

// testing with all input type
// with respective regex
const patternTest = (type, key) => {
if (type === "number") {
// Check if the pressed key is a number
return /^\d$/.test(key);
}
if (type === "letter") {
// Check if the pressed key is a letter (a-zA-Z)
// Lower & upper case letters a-z
// Prevent input of other characters
return /^[a-zA-Z]$/.test(key);
}
if (type === "alpha-numeric") {
// Check if the pressed key is a number (0-9) or a letter (a-zA-Z)
// Numpad numbers 0-9
// Prevent input of other characters
return /^[a-zA-Z\d]$/.test(key);
}

return true
}


// Allow some special keys like Backspace, Tab, Home, End, Left Arrow, Right Arrow, Delete.
const allowedKeyCodes = [8, 9, 17, 35, 36, 37, 39, 46];
const allowedKeyCodes =
['Backspace', 'Tab', 'Control', 'End', 'Home', 'ArrowLeft', 'ArrowRight', 'Delete'];

if (!allowedKeyCodes.includes(keyCode) && !multiKeyChecking(keyCode, e.ctrlKey)) {
if (!allowedKeyCodes.includes(keyCode) && !multiKeyChecking(keyCode, e.ctrlKey, maxLength)) {
// checking max length for the input
// if greater than the max length then prevent the default action
if (!checkMaxLength(maxLength)) {
e.preventDefault();
}

if (type === "number" && !numberChecking(keyCode, e.shiftKey)) {
// Check if the pressed key is a number
e.preventDefault();
} else if (type === "letter" && !letterChecking(keyCode)) {
// Check if the pressed key is a letter (a-zA-Z)
// Lower & upper case letters a-z
// Prevent input of other characters
e.preventDefault();
} else if (
type === "alpha-numeric" &&
!(numberChecking(keyCode, e.shiftKey) || letterChecking(keyCode))
) {
// Check if the pressed key is a number (0-9) or a letter (a-zA-Z)
// Numpad numbers 0-9
// Prevent input of other characters
// checking patter for number, letter & alpha-numeric
if (!patternTest(type, keyCode)) {
e.preventDefault();
}
}
Expand Down
Loading