Skip to content

Conversation

@gbrodman
Copy link
Collaborator

@gbrodman gbrodman commented Nov 15, 2024

For now it only includes two options (domain deletion and domain suspension). In the future, as necessary, we can add other actions but this seems like a relatively simple starting point (actions like bulk updates are much more conceptually complex).


This change is Reviewable

@gbrodman gbrodman force-pushed the bulkDomain branch 2 times, most recently from 94a8739 to f7e7f11 Compare November 18, 2024 16:59
@gbrodman gbrodman requested a review from ptkach November 18, 2024 21:29
Copy link
Collaborator

@ptkach ptkach left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 5 files at r1, all commit messages.
Reviewable status: 1 of 5 files reviewed, 1 unresolved discussion (waiting on @gbrodman)


core/src/main/java/google/registry/ui/server/console/ConsoleBulkDomainAction.java line 163 at r2 (raw file):

        consoleApiParams.gson().fromJson(jsonPayload, BulkDomainDeleteRequest.class).reason;
    return runCommandOverDomains(
        domainList, DOMAIN_DELETE_XML.replaceAll("%REASON%", reason), user);

I'm not sure this is safe. Can you add escpageXml here and below for both REASON and DOMAIN_NAMES before replacing?

Code quote:

DOMAIN_DELETE_XML.replaceAll

For now it only includes two options (domain deletion and domain
suspension). In the future, as necessary, we can add other actions but
this seems like a relatively simple starting point (actions like bulk
updates are much more conceptually complex).
Copy link
Collaborator Author

@gbrodman gbrodman left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 5 files reviewed, 1 unresolved discussion (waiting on @ptkach)


core/src/main/java/google/registry/ui/server/console/ConsoleBulkDomainAction.java line 163 at r2 (raw file):

Previously, ptkach (Pavlo Tkach) wrote…

I'm not sure this is safe. Can you add escpageXml here and below for both REASON and DOMAIN_NAMES before replacing?

yeah, good point -- we should use an escaper . Done.

We may wish to refactor out this XML parsing / loading at some point if we have a ton of XML templates, but this should be fine for now when it's just the two.

Copy link
Collaborator

@ptkach ptkach left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 5 files at r1, 2 of 3 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @gbrodman)

@gbrodman gbrodman added this pull request to the merge queue Nov 22, 2024
Merged via the queue into google:master with commit 21950f7 Nov 22, 2024
6 checks passed
@gbrodman gbrodman deleted the bulkDomain branch November 22, 2024 21:35
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.

2 participants