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

MOSIP:31897 - Security: input validation #712

Merged
merged 1 commit into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading