Skip to content

Commit

Permalink
Added: [untested] low trust html sanitizer (#341)
Browse files Browse the repository at this point in the history
  • Loading branch information
signebedi committed Sep 17, 2024
1 parent 62bc6bd commit c4d9b2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions libreforms_fastapi/utils/docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

sanitizer = Sanitizer(sanitizer_config)

low_trust_sanitizer = Sanitizer()

class UnsafeHtmlContentError(Exception):
"""Custom exception for unsafe HTML content."""
Expand Down
4 changes: 2 additions & 2 deletions libreforms_fastapi/utils/document_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
# This import is used to afix digital signatures to records
from libreforms_fastapi.utils.certificates import sign_record, verify_record_signature

# This import is used to sanitize data on writes
from libreforms_fastapi.utils.docs import sanitizer
# This import is used to sanitize data
from libreforms_fastapi.utils.docs import low_trust_sanitizer as sanitizer


# Mapping of string operators to actual functions, used as query parameters
Expand Down

0 comments on commit c4d9b2b

Please sign in to comment.