Skip to content

Commit

Permalink
MOSIP:31897 - Security: input validation
Browse files Browse the repository at this point in the history
Signed-off-by: sudeep <[email protected]>
  • Loading branch information
Sudeep7353 committed Mar 29, 2024
1 parent a24a821 commit 8a9029e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/app/core/components/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,12 @@ export class DialogComponent implements OnInit {
(res: any) => {
this.dataLoaded = true;
if (res) {
this.dialogRef.close(false);
if (res.errors && res.errors.length > 0) {
this.dialogRef.close(true);
Utils.showErrorMessage(this.resourceBundleJson, res.errors, this.dialog);
} else {
this.dialogRef.close(false);
}
} else {
Utils.showErrorMessage(this.resourceBundleJson,
null,
Expand Down Expand Up @@ -471,7 +476,12 @@ export class DialogComponent implements OnInit {
(res: any) => {
this.dataLoaded = true;
if (res) {
this.dialogRef.close(false);
if (res.errors && res.errors.length > 0) {
this.dialogRef.close(true);
Utils.showErrorMessage(this.resourceBundleJson, res.errors, this.dialog);
} else {
this.dialogRef.close(false);
}
} else {
Utils.showErrorMessage(this.resourceBundleJson,
null,
Expand Down
8 changes: 8 additions & 0 deletions src/assets/i18n/ara.json
Original file line number Diff line number Diff line change
Expand Up @@ -2034,6 +2034,14 @@
"TOOLKIT_REQ_ERR_052": "حدث خطأ أثناء جلب القالب",
"TOOLKIT_REQ_ERR_053": "تنسيق إصدار القالب غير صالح.",
"TOOLKIT_REQ_ERR_054": "حدث خطأ أثناء جلب نسخة القالب.",
"TOOLKIT_REQ_ERR_055": "تعليقات",
"TOOLKIT_REQ_ERR_056": "عنوان URL الأساسي لـ SDK",
"TOOLKIT_REQ_ERR_057": "اسم المجموعة",
"TOOLKIT_REQ_ERR_058": "اسم بيانات الاختبار",
"TOOLKIT_REQ_ERR_059": "اسم الملف",
"TOOLKIT_REQ_ERR_060": "اسم القالب",
"TOOLKIT_REQ_ERR_061": "إصدار",
"TOOLKIT_REQ_ERR_062": "نوع ملف الموارد",
"TOOLKIT_REQ_ERR_500": "خطأ تقني",
"TOOLKIT_DB_ERR_001": "لقد سبق لك إنشاء مشروع بالاسم",
"TOOLKIT_DB_ERR_002": "لقد أضفت سابقًا بيانات اختبار القياسات الحيوية بالاسم",
Expand Down
8 changes: 8 additions & 0 deletions src/assets/i18n/eng.json
Original file line number Diff line number Diff line change
Expand Up @@ -2034,6 +2034,14 @@
"TOOLKIT_REQ_ERR_052": "Error while fetching template",
"TOOLKIT_REQ_ERR_053": "Invalid template version format.",
"TOOLKIT_REQ_ERR_054": "Error while fetching template version.",
"TOOLKIT_REQ_ERR_055": "comments",
"TOOLKIT_REQ_ERR_056": "SDK base URL",
"TOOLKIT_REQ_ERR_057": "collection name",
"TOOLKIT_REQ_ERR_058": "test data name",
"TOOLKIT_REQ_ERR_059": "file name",
"TOOLKIT_REQ_ERR_060": "template name",
"TOOLKIT_REQ_ERR_061": "version",
"TOOLKIT_REQ_ERR_062": "resource file type",
"TOOLKIT_DB_ERR_001": "You have previously created a project with the same name",
"TOOLKIT_DB_ERR_002": "You have previously added biometric test data with the same name",
"TOOLKIT_DB_ERR_003": "You have previously created a collection with the same name",
Expand Down
8 changes: 8 additions & 0 deletions src/assets/i18n/fra.json
Original file line number Diff line number Diff line change
Expand Up @@ -2034,6 +2034,14 @@
"TOOLKIT_REQ_ERR_052": "Erreur lors de la récupération du modèle",
"TOOLKIT_REQ_ERR_053": "Format de version de modèle non valide.",
"TOOLKIT_REQ_ERR_054": "Erreur lors de la récupération de la version du modèle.",
"TOOLKIT_REQ_ERR_055": "commentaires",
"TOOLKIT_REQ_ERR_056": "URL de base du SDK",
"TOOLKIT_REQ_ERR_057": "nom de la collection",
"TOOLKIT_REQ_ERR_058": "nom des données de test",
"TOOLKIT_REQ_ERR_059": "nom de fichier",
"TOOLKIT_REQ_ERR_060": "nom du modèle",
"TOOLKIT_REQ_ERR_061": "version",
"TOOLKIT_REQ_ERR_062": "type de fichier de ressources",
"TOOLKIT_REQ_ERR_500": "Erreur technique",
"TOOLKIT_DB_ERR_001": "Vous avez précédemment créé un projet avec le nom",
"TOOLKIT_DB_ERR_002": "Vous avez précédemment ajouté des données de test biométrique avec le nom",
Expand Down

0 comments on commit 8a9029e

Please sign in to comment.