Skip to content

Commit

Permalink
Sanitize input #805
Browse files Browse the repository at this point in the history
  • Loading branch information
jokob-sk committed Sep 25, 2024
1 parent 2784f2e commit 15a7779
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion front/plugins/newdev_template/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
"description": [
{
"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."
}
]
},
Expand Down
5 changes: 3 additions & 2 deletions server/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,8 +808,9 @@ def sanitize_string(input):

#-------------------------------------------------------------------------------
def sanitize_SQL_input(val):
val = val.replace("'", '_')
return val
if val is None:
return ''
return val.replace("'", "_")


#-------------------------------------------------------------------------------
Expand Down

0 comments on commit 15a7779

Please sign in to comment.