mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
Bump utils and sanitise header values
Updated notifications-utils. This brings in - the renamed character sanitization classes - the change to allow unicode in letter addresses (this lets us delete a test that is no longer relevant) Also replaced non-ascii characters in headers. This fixes a bug where non-ascii characters in a CSV filename were causing errors since the filename is also used in the header.
This commit is contained in:
@@ -33,6 +33,7 @@ from notifications_utils.recipients import (
|
||||
format_phone_number_human_readable,
|
||||
)
|
||||
from notifications_utils.formatters import formatted_list
|
||||
from notifications_utils.sanitise_text import SanitiseASCII
|
||||
from werkzeug.exceptions import abort
|
||||
from werkzeug.local import LocalProxy
|
||||
|
||||
@@ -493,6 +494,8 @@ def useful_headers_after_request(response):
|
||||
del response.headers['Cache-Control']
|
||||
response.headers.add(
|
||||
'Cache-Control', 'no-store, no-cache, private, must-revalidate')
|
||||
for key, value in response.headers:
|
||||
response.headers[key] = SanitiseASCII.encode(value)
|
||||
return response
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user