Extensions menu: strip fragment, query and trailing dots from site-settings label [chromium/src : main]

0 views
Skip to first unread message

Emilia Paz (Gerrit)

unread,
Mar 30, 2026, 7:21:25 PM (3 days ago) Mar 30
to Bug Bounty Channel, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Bug Bounty Channel

Emilia Paz added 1 comment

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Emilia Paz . resolved

Thanks for spotting this! Instead of sanitizing the URL itself, we can leverage an existent method. `FormatUrlForSecurityDisplay` omitting the scheme should do the trick

https://source.chromium.org/chromium/chromium/src/+/main:components/url_formatter/elide_url.h;l=62-85;drc=cf44d078028acbcb97d0fc80630ba9087a9ae620;bpv=1;bpt=1

Open in Gerrit

Related details

Attention is currently required from:
  • Bug Bounty Channel
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I186998d0794a4596eb32364a314e19baf20fd476
Gerrit-Change-Number: 7707159
Gerrit-PatchSet: 1
Gerrit-Owner: Bug Bounty Channel <sas....@gmail.com>
Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
Gerrit-Attention: Bug Bounty Channel <sas....@gmail.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 23:21:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Bug Bounty Channel (Gerrit)

unread,
Mar 31, 2026, 11:05:25 AM (2 days ago) Mar 31
to Chromium LUCI CQ, Emilia Paz, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Bug Bounty Channel and Emilia Paz

Bug Bounty Channel voted and added 1 comment

Votes added by Bug Bounty Channel

Auto-Submit+1
Commit-Queue+1

1 comment

Patchset-level comments
Emilia Paz . resolved

Thanks for spotting this! Instead of sanitizing the URL itself, we can leverage an existent method. `FormatUrlForSecurityDisplay` omitting the scheme should do the trick

https://source.chromium.org/chromium/chromium/src/+/main:components/url_formatter/elide_url.h;l=62-85;drc=cf44d078028acbcb97d0fc80630ba9087a9ae620;bpv=1;bpt=1

Bug Bounty Channel

done

Open in Gerrit

Related details

Attention is currently required from:
  • Bug Bounty Channel
  • Emilia Paz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I186998d0794a4596eb32364a314e19baf20fd476
Gerrit-Change-Number: 7707159
Gerrit-PatchSet: 2
Gerrit-Owner: Bug Bounty Channel <sas....@gmail.com>
Gerrit-Reviewer: Bug Bounty Channel <sas....@gmail.com>
Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
Gerrit-Attention: Bug Bounty Channel <sas....@gmail.com>
Gerrit-Attention: Emilia Paz <emil...@chromium.org>
Gerrit-Comment-Date: Tue, 31 Mar 2026 15:04:52 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Emilia Paz <emil...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Emilia Paz (Gerrit)

unread,
Mar 31, 2026, 8:34:03 PM (2 days ago) Mar 31
to Bug Bounty Channel, Chromium LUCI CQ, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
Attention needed from Bug Bounty Channel

Emilia Paz added 5 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Emilia Paz . resolved

Thanks! Getting closer :)

Commit Message
Line 20, Patchset 2 (Latest):- file:// URLs: strip fragment via GetWithoutRef(), strip query
string via std::string::find('?'), then strip trailing dots via
find_last_not_of('.')
Emilia Paz . unresolved

update this to last implementation

File chrome/browser/ui/extensions/extensions_menu_view_model.cc
Line 995, Patchset 2 (Latest): base::TrimString(current_site, u". ", &current_site);
Emilia Paz . unresolved

Add a comment that explains why this is needed.

Line 996, Patchset 2 (Latest): } else if (url.SchemeIs(url::kDataScheme)) {
current_site = u"data:";
} else {
Emilia Paz . unresolved

I think it's ok to show the full data url. Page info shows the data url (see [screenshot](https://drive.google.com/file/d/1BM4HPLF6_MOTetcCAS8M2SCfx4Gr8GLL/view?usp=drive_link))

Changing that would be a different conversation. I think for this CL we can just address the url for file.

Line 1000, Patchset 2 (Latest): extensions::ui_util::GetFormattedHostForDisplay(*web_contents);
Emilia Paz . unresolved

Could we use `url_formatter::FormatUrlForSecurityDisplay` for all cases? so not differentiating scheme is file?
And, make this change on chrome/browser/extensions/extension_ui_util.cc so we fix this bug for all cases :)

Open in Gerrit

Related details

Attention is currently required from:
  • Bug Bounty Channel
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I186998d0794a4596eb32364a314e19baf20fd476
    Gerrit-Change-Number: 7707159
    Gerrit-PatchSet: 2
    Gerrit-Owner: Bug Bounty Channel <sas....@gmail.com>
    Gerrit-Reviewer: Bug Bounty Channel <sas....@gmail.com>
    Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
    Gerrit-Attention: Bug Bounty Channel <sas....@gmail.com>
    Gerrit-Comment-Date: Wed, 01 Apr 2026 00:33:48 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Bug Bounty Channel (Gerrit)

    unread,
    8:30 AM (7 hours ago) 8:30 AM
    to Chromium LUCI CQ, Emilia Paz, chromium...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org
    Attention needed from Emilia Paz

    Bug Bounty Channel voted and added 4 comments

    Votes added by Bug Bounty Channel

    Auto-Submit+1
    Commit-Queue+2

    4 comments

    Commit Message
    Line 20, Patchset 2:- file:// URLs: strip fragment via GetWithoutRef(), strip query

    string via std::string::find('?'), then strip trailing dots via
    find_last_not_of('.')
    Emilia Paz . resolved

    update this to last implementation

    Bug Bounty Channel

    done

    File chrome/browser/ui/extensions/extensions_menu_view_model.cc
    Line 995, Patchset 2: base::TrimString(current_site, u". ", &current_site);
    Emilia Paz . resolved

    Add a comment that explains why this is needed.

    Bug Bounty Channel

    done

    Line 996, Patchset 2: } else if (url.SchemeIs(url::kDataScheme)) {

    current_site = u"data:";
    } else {
    Emilia Paz . resolved

    I think it's ok to show the full data url. Page info shows the data url (see [screenshot](https://drive.google.com/file/d/1BM4HPLF6_MOTetcCAS8M2SCfx4Gr8GLL/view?usp=drive_link))

    Changing that would be a different conversation. I think for this CL we can just address the url for file.

    Bug Bounty Channel

    done

    Line 1000, Patchset 2: extensions::ui_util::GetFormattedHostForDisplay(*web_contents);
    Emilia Paz . resolved

    Could we use `url_formatter::FormatUrlForSecurityDisplay` for all cases? so not differentiating scheme is file?
    And, make this change on chrome/browser/extensions/extension_ui_util.cc so we fix this bug for all cases :)

    Bug Bounty Channel

    done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Emilia Paz
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I186998d0794a4596eb32364a314e19baf20fd476
      Gerrit-Change-Number: 7707159
      Gerrit-PatchSet: 3
      Gerrit-Owner: Bug Bounty Channel <sas....@gmail.com>
      Gerrit-Reviewer: Bug Bounty Channel <sas....@gmail.com>
      Gerrit-Reviewer: Emilia Paz <emil...@chromium.org>
      Gerrit-Attention: Emilia Paz <emil...@chromium.org>
      Gerrit-Comment-Date: Thu, 02 Apr 2026 12:30:03 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy
      Reply all
      Reply to author
      Forward
      0 new messages