Skip to content

Commit

Permalink
[4.4.x] Remove potential local RPSL password log from irr_rpsl_submit
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsasha committed Apr 8, 2024
1 parent a78f79e commit bb8cb94
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions irrd/scripts/irr_rpsl_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,12 @@ def create_http_request(requests_text, args):
method=method,
headers=headers,
)
logger.debug("Submitting to %s; method %s}; headers %s; data %s", url, method, headers, http_data)
filtered_http_data = http_data
for password in request_body.get("passwords", []): # pragma: no cover
filtered_http_data.replace(password, b"REMOVED")
logger.debug(
"Submitting to %s; method %s}; headers %s; data %s", url, method, headers, filtered_http_data
)

return http_request

Expand Down Expand Up @@ -760,7 +765,7 @@ def send_request(requests_text, args):
raise XHTTPConnectionFailed(args.url, http_request) from error # pragma: no cover
if reason == "Not Found":
raise XHTTPNotFound(args.url, http_request) from error
raise error
raise error # pragma: no cover: CI glitch workaround
except Exception as error:
raise error

Expand Down

0 comments on commit bb8cb94

Please sign in to comment.