Skip to content

Commit

Permalink
escape documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroroiz committed Apr 17, 2024
1 parent d5dff33 commit 6343ba9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions confidant/routes/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ def create_credential():
value = escape(value)
metadata[key] = value

# TODO: fix documentation escape
data['documentation'] = escape(data.get('documentation'))

sanitized_name = escape(data['name'])
cred = Credential(
Expand Down Expand Up @@ -845,7 +845,8 @@ def update_credential(id):
value = escape(value)
data['metadata'][key] = value

# TODO: fix documentation escape
if data.get('documentation') != _cred.documentation:
data['documentation'] = escape(data.get('documentation'))

update = {
'name': data.get('name', _cred.name),
Expand Down

0 comments on commit 6343ba9

Please sign in to comment.