aspnetcore icon indicating copy to clipboard operation
aspnetcore copied to clipboard

Fix Prefix Matching Logic in PrefixContainer

Open sami-daniel opened this issue 1 year ago • 14 comments

Fix Prefix Matching Logic in PrefixContainer

Description

This PR modifies the BinarySearch method in PrefixContainer to ensure that an exact match of a prefix does not incorrectly qualify as a valid prefix.

Now the ContainsPrefix method no longer gives a false positive if it has a prefix with the same name as the Action method parameter.

Fixes #57637

sami-daniel avatar Sep 25 '24 09:09 sami-daniel

@sami-daniel please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

sami-daniel avatar Sep 25 '24 10:09 sami-daniel

A small JIT-trick for better machine code.

I didn't know that, but it makes sense, thanks!

sami-daniel avatar Sep 25 '24 23:09 sami-daniel

I didn't know that

The nice thing on contributing: you help to improve the product and get the opportunity to learn something new. A win - win situation 😃.

Thanks for the PR 👍🏻

gfoidl avatar Sep 26 '24 11:09 gfoidl

I didn't know that

The nice thing on contributing: you help to improve the product and get the opportunity to learn something new. A win - win situation 😃.

Thanks for the PR 👍🏻

Yessss, C# and .NET have been my focus of study since the beginning of my interest in technology and until now I don't even know half of its power. This is my first contribution and I already loved it. Thanks!

sami-daniel avatar Sep 26 '24 12:09 sami-daniel

Yessss, C# and .NET have been my focus of study since the beginning of my interest in technology and until now I don't even know half of its power. This is my first contribution and I already loved it. Thanks!

Love it, welcome @sami-daniel!

adityamandaleeka avatar Oct 04 '24 23:10 adityamandaleeka

/azp run

adityamandaleeka avatar Oct 04 '24 23:10 adityamandaleeka

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 04 '24 23:10 azure-pipelines[bot]

Ubuntu failure is unrelated; it failed during node installation. cc: @dotnet/aspnet-build

##[error]Request timeout: /dist/index.json

adityamandaleeka avatar Oct 05 '24 00:10 adityamandaleeka

/azp run

FatTigerWang avatar Oct 10 '24 05:10 FatTigerWang

Commenter does not have sufficient privileges for PR 58068 in repo dotnet/aspnetcore

azure-pipelines[bot] avatar Oct 10 '24 05:10 azure-pipelines[bot]

/azp run

wtgodbe avatar Oct 10 '24 16:10 wtgodbe

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Oct 10 '24 16:10 azure-pipelines[bot]

Not sure if there's something making our CI more flaky than normal...

/azp run

adityamandaleeka avatar Oct 18 '24 01:10 adityamandaleeka

Hello again :). Would it be possible to run the pipelines gain to see if the behavior is the same? I will make some changes if necessary

sami-daniel avatar Dec 03 '24 22:12 sami-daniel

/azp run

wtgodbe avatar Dec 03 '24 22:12 wtgodbe

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Dec 03 '24 22:12 azure-pipelines[bot]

/azp run

captainsafia avatar Dec 16 '24 22:12 captainsafia

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Dec 16 '24 22:12 azure-pipelines[bot]

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime. To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

Hi @sami-daniel. It seems you haven't touched this PR for the last two weeks. To avoid accumulating old PRs, we're marking it as stale. As a result, it will be closed if no further activity occurs within 4 days of this comment. You can learn more about our Issue Management Policies here.

Moved to #62459 because I lost the branch where this PR was attached.

sami-daniel avatar Jun 25 '25 04:06 sami-daniel