Sanitize input #805
Some checks are pending
docker / docker_dev (push) Waiting to run

This commit is contained in:
jokob-sk
2024-09-26 08:08:24 +10:00
parent 2784f2ebeb
commit 15a7779d6e
2 changed files with 4 additions and 3 deletions

View File

@@ -261,7 +261,7 @@
"description": [ "description": [
{ {
"language_code": "en_us", "language_code": "en_us",
"string": "All the newly discovered device names are clened up by applying the following REGEX expression in this order. All the below are replaced by a blank string." "string": "All the newly discovered device names are cleaned up by applying the following REGEX expression in this order. All the below are replaced by a blank string."
} }
] ]
}, },

View File

@@ -808,8 +808,9 @@ def sanitize_string(input):
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
def sanitize_SQL_input(val): def sanitize_SQL_input(val):
val = val.replace("'", '_') if val is None:
return val return ''
return val.replace("'", "_")
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------