Skip to content

Commit d3f85dc

Browse files
committed
[CVE-2024-6844] Replace use of (urllib) unquote_plus with unquote for paths
1 parent 5da9be4 commit d3f85dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flask_cors/extension.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import logging
2-
from urllib.parse import unquote_plus
2+
from urllib.parse import unquote
33

44
from flask import request
55

@@ -188,7 +188,7 @@ def cors_after_request(resp):
188188
if resp.headers is not None and resp.headers.get(ACL_ORIGIN):
189189
LOG.debug("CORS have been already evaluated, skipping")
190190
return resp
191-
normalized_path = unquote_plus(request.path)
191+
normalized_path = unquote(request.path)
192192
for res_regex, res_options in resources:
193193
if try_match(normalized_path, res_regex):
194194
LOG.debug(

0 commit comments

Comments
 (0)