Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit 07bb1dc

Browse files
authored
MYSQL-80 Remove plugin .json file for version 2.0.26 from the code repository, MYSQL-78 Support latest dvp version 3.1.0, MYSQL-59 Security -> Password field on UI can be used to inject SQL queries (#21)
* MYSQL-59 Security -> Password field on UI can be used to inject SQL queries * MYSQL-78 Support latest dvp version 3.1.0, MYSQL-59 Security -> Password field on UI can be used to inject SQL queries * MYSQL-80 Remove plugin .json file for version 2.0.26 from the code repository, MYSQL-78 Support latest dvp version 3.1.0, MYSQL-59 Security -> Password field on UI can be used to inject SQL queries
1 parent fecafc3 commit 07bb1dc

File tree

4 files changed

+27
-401
lines changed

4 files changed

+27
-401
lines changed

mysql_artifact_v2.0.26.json

Lines changed: 0 additions & 391 deletions
This file was deleted.

plugin_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ pluginType: STAGED
77
entryPoint: plugin_runner:plugin
88
srcDir: src
99
schemaFile: schema.json
10-
buildNumber: 2.0.26
10+
buildNumber: 2.0.40

schema.json

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,13 @@
7979
"prettyName": "DB User",
8080
"description": "DB user for the virtual database",
8181
"default": "delphixdb"
82-
},
82+
},
8383
"vdbPass": {
8484
"type": "string",
8585
"format": "password",
86+
"pattern" : "^[^\"\\'\\s]*$",
8687
"prettyName": "DB Password",
87-
"description": "DB user password for the virtual database",
88+
"description": "DB user password for the virtual database. Double quote, single quote or space characters are not valid.",
8889
"default": "Delphix@123"
8990
},
9091
"baseDir": {
@@ -199,8 +200,9 @@
199200
"sourcePass": {
200201
"type": "string",
201202
"format": "password",
203+
"pattern" : "^[^\"\\'\\s]*$",
202204
"prettyName": "Source Connection Password",
203-
"description": "* Required if Delphix is taking backups",
205+
"description": "* Required if Delphix is taking backups. Double quote, single quote or space characters are not valid.",
204206
"default": "Delphix@123"
205207
},
206208
"databaseList": {
@@ -224,15 +226,17 @@
224226
"replicationPass": {
225227
"type": "string",
226228
"format": "password",
229+
"pattern" : "^[^\"\\'\\s]*$",
227230
"prettyName": "Replication User's Password",
228-
"description": "* Required if using Replication Method with LogSync",
231+
"description": "* Required if using Replication Method with LogSync. Double quote, single quote or space characters are not valid.",
229232
"default": "Delphix@123"
230233
},
231234
"stagingPass": {
232235
"type": "string",
233236
"format": "password",
237+
"pattern" : "^[^\"\\'\\s]*$",
234238
"prettyName": "Staging Initialization Password",
235-
"description": "root user password to use while initializing Staging DB.",
239+
"description": "root user password to use while initializing Staging DB. Double quote, single quote or space characters are not valid.",
236240
"default": "Delphix@123"
237241
},
238242
"serverId": {
@@ -306,5 +310,18 @@
306310
"description": "Time when the snapshot was taken."
307311
}
308312
}
313+
},
314+
"snapshotParametersDefinition": {
315+
"type" : "object",
316+
"additionalProperties" : false,
317+
"required": ["resync"],
318+
"properties" : {
319+
"resync" : {
320+
"type": "boolean",
321+
"default": true,
322+
"prettyName": "Resynchronize dSource",
323+
"description": "Before taking a snapshot will refresh the staging database to update its data. Unselect this option if you wish to snapshot the staging database in its current state."
324+
}
325+
}
309326
}
310327
}

src/plugin_runner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ def stop_staging(staged_source, repository, source_config):
7575
pluginops.stop_staging(staged_source, repository, source_config)
7676

7777
@plugin.linked.pre_snapshot()
78-
def linked_pre_snapshot(staged_source, repository, source_config, snapshot_parameters):
78+
def linked_pre_snapshot(staged_source, repository, source_config, optional_snapshot_parameters):
7979
logger.debug("linked_pre_snapshot > Start ")
8080
# Start Staging if not already running.
81-
pluginops.linked_pre_snapshot(staged_source, repository, source_config, snapshot_parameters)
81+
pluginops.linked_pre_snapshot(staged_source, repository, source_config, optional_snapshot_parameters)
8282
logger.debug(" linked_pre_snapshot > End ")
8383

8484
@plugin.linked.post_snapshot()
85-
def linked_post_snapshot(staged_source,repository,source_config,snapshot_parameters):
85+
def linked_post_snapshot(staged_source,repository,source_config,optional_snapshot_parameters):
8686
logger.debug("linked_post_snapshot - Start ")
87-
snapshot = pluginops.linked_post_snapshot(staged_source,repository,source_config,snapshot_parameters)
87+
snapshot = pluginops.linked_post_snapshot(staged_source,repository,source_config,optional_snapshot_parameters)
8888
linked_status(staged_source, repository, source_config)
8989
logger.debug("linked_post_snapshot - End ")
9090
return snapshot

0 commit comments

Comments
 (0)