Skip to content

Throw on invalid responses from SafeBrowsing#3111

Merged
gbrodman merged 1 commit into
google:masterfrom
gbrodman:safeBrowsingException
Jul 6, 2026
Merged

Throw on invalid responses from SafeBrowsing#3111
gbrodman merged 1 commit into
google:masterfrom
gbrodman:safeBrowsingException

Conversation

@gbrodman

@gbrodman gbrodman commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

this allows us to

  1. use the built-in retrier to retry
  2. fail loudly if it keeps actually throwing an exception if we're doing something invalid

This change is Reviewable

@gbrodman
gbrodman force-pushed the safeBrowsingException branch from f10807e to 251eedb Compare June 26, 2026 20:08
@gbrodman
gbrodman requested a review from jicelhay June 29, 2026 17:41
@gbrodman

gbrodman commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator Author

friendly ping

@jicelhay

jicelhay commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

core/src/main/java/google/registry/beam/spec11/SafeBrowsingTransforms.java line 239 at r2 (raw file):

          new InputStreamReader(response.getEntity().getContent(), UTF_8)) {
        JSONObject responseBody = new JSONObject(CharStreams.toString(reader));
        logger.atInfo().log("Got response: %s", responseBody);

sanitize responseBody to avoid Log Injection - "This log entry depends on a user-provided value." warning.

@jicelhay

jicelhay commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

done. I was OOO last week.

this allows us to
1. use the built-in retrier to retry
2. fail loudly if it keeps actually throwing an exception if we're doing
   something invalid
@gbrodman
gbrodman force-pushed the safeBrowsingException branch from 251eedb to 18d4269 Compare July 6, 2026 18:01

@gbrodman gbrodman left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbrodman made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on jicelhay).


core/src/main/java/google/registry/beam/spec11/SafeBrowsingTransforms.java line 239 at r2 (raw file):

Previously, jicelhay (Juan Celhay) wrote…

sanitize responseBody to avoid Log Injection - "This log entry depends on a user-provided value." warning.

eh yeah let's just remove it, not needed

@jicelhay

jicelhay commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

:lgtm:

@jicelhay jicelhay left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jicelhay reviewed 1 file and all commit messages, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on gbrodman).

@gbrodman
gbrodman enabled auto-merge July 6, 2026 18:08
@gbrodman
gbrodman added this pull request to the merge queue Jul 6, 2026
Merged via the queue into google:master with commit 160abef Jul 6, 2026
16 checks passed
@gbrodman
gbrodman deleted the safeBrowsingException branch July 6, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants