Hi,
Please find the attached patch which will fix RMs # 1220 and #1221.
If the database name contains = then the backup, maintenance and restore
jobs are failing.
To fix these, we will display the error message regarding inappropriate
database name.
Thanks,
Khushboo
diff --git a/web/pgadmin/tools/backup/static/js/backup.js b/web/pgadmin/tools/backup/static/js/backup.js
index ddbfaee..361cc4a 100644
--- a/web/pgadmin/tools/backup/static/js/backup.js
+++ b/web/pgadmin/tools/backup/static/js/backup.js
@@ -984,6 +984,14 @@ commonUtils
var treeInfo = node.getTreeNodeHierarchy.apply(node, [i]);
+ if (treeInfo.database._label.indexOf('=') >= 0) {
+ alertify.alert(
+ gettext('Backup error'),
+ gettext('Backup job creation failed. The database name is inappropriate.')
+ );
+ return;
+ }
+
// Set current database into model
this.view.model.set('database', treeInfo.database._label);
diff --git a/web/pgadmin/tools/maintenance/static/js/maintenance.js b/web/pgadmin/tools/maintenance/static/js/maintenance.js
index 81e4594..51bbcf3 100644
--- a/web/pgadmin/tools/maintenance/static/js/maintenance.js
+++ b/web/pgadmin/tools/maintenance/static/js/maintenance.js
@@ -359,6 +359,14 @@ define([
var treeInfo = node.getTreeNodeHierarchy.apply(node, [i]);
+ if (treeInfo.database._label.indexOf('=') >= 0) {
+ Alertify.alert(
+ gettext('Maintenance error'),
+ gettext('Maintenance job creation failed. The database name is inappropriate.')
+ );
+ return;
+ }
+
if (treeInfo.schema != undefined) {
schema = treeInfo.schema._label;
}
diff --git a/web/pgadmin/tools/restore/static/js/restore.js b/web/pgadmin/tools/restore/static/js/restore.js
index 5c082a9..b43fbde 100644
--- a/web/pgadmin/tools/restore/static/js/restore.js
+++ b/web/pgadmin/tools/restore/static/js/restore.js
@@ -616,6 +616,15 @@ commonUtils
var info = node.getTreeNodeHierarchy.apply(node, [i]),
m = this.view.model;
+
+ if (info.database._label.indexOf('=') >= 0) {
+ alertify.alert(
+ gettext('Restore error'),
+ gettext('Restore job creation failed. The database name is inappropriate.')
+ );
+ return;
+ }
+
// Set current node info into model
m.set('database', info.database._label);
if (!m.get('custom')) {