Skip to content

Commit

Permalink
Avoid submitting spaces and % in path
Browse files Browse the repository at this point in the history
  • Loading branch information
Marven11 committed Nov 26, 2024
1 parent 3e3d0c5 commit ce4f5cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fenjing/submitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,9 @@ def __init__(
self.add_tamperer(tamperer)

def submit_raw(self, raw_payload: str) -> Union[HTTPResponse, None]:
if any(w in raw_payload for w in ["/", ".."]):
# python requests would reencode url, resulting in payload being changed
# that's why we're avoiding spaces and '%'
if any(w in raw_payload for w in ["/", "..", " ", "%"]):
logger.info(
"Don't submit %s because it can't be in the path.",
colored("yellow", repr(raw_payload)),
Expand Down

0 comments on commit ce4f5cb

Please sign in to comment.