Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Prevent improper parsing on 'Uri.UserInfo' with exception #2116

Merged

Conversation

OnedgeLee
Copy link
Contributor

Changes

  • Replace improper handling on invalid url with throwing exception

Related issue

@OnedgeLee OnedgeLee self-assigned this Jun 27, 2022
@OnedgeLee OnedgeLee added good first issue Good for newcomers api Related to user-facing APIs labels Jun 27, 2022
@OnedgeLee OnedgeLee added this to In progress in Libplanet via automation Jun 27, 2022
@OnedgeLee
Copy link
Contributor Author

OnedgeLee commented Jun 27, 2022

First CI Test on ci/circleci: linux-netcore-test-fr-FR was failed, so I've reran the test, and it was terminated without failure.
I couldn't figure out the reason why the first test was failed, but in my opinion, it's not related with this PR.

@OnedgeLee
Copy link
Contributor Author

Do I have to update CHANGES.md?

@OnedgeLee OnedgeLee marked this pull request as ready for review June 27, 2022 04:16
@OnedgeLee OnedgeLee moved this from In progress to Review in progress in Libplanet Jun 27, 2022
@OnedgeLee
Copy link
Contributor Author

I'll try to track test failure case, and raise an issue if it's needed

@greymistcube
Copy link
Contributor

// FIXME: This doesn't account for multiple colons.

This comment should be removed. 😗

@greymistcube
Copy link
Contributor

Do I have to update CHANGES.md?

Should be added under Bug fixes.

@OnedgeLee OnedgeLee force-pushed the feature/fix-iceserver_uri_parser branch from 36cbbec to c27e6f5 Compare June 27, 2022 09:26
CHANGES.md Outdated Show resolved Hide resolved
@OnedgeLee OnedgeLee force-pushed the feature/fix-iceserver_uri_parser branch from 656f7c4 to 37786a4 Compare June 27, 2022 12:33
@OnedgeLee
Copy link
Contributor Author

@greymistcube

  1. Use single variable bool colonFound to check multiple colons and split username and credential
  2. Add changelog to specify where in the API has "changed" 😄

@OnedgeLee OnedgeLee force-pushed the feature/fix-iceserver_uri_parser branch from 37786a4 to 2cd08c4 Compare June 27, 2022 23:20
@pull-request-quantifier-deprecated

This PR has 25 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Extra Small
Size       : +17 -8
Percentile : 10%

Total files changed: 3

Change summary by file extension:
.md : +3 -0
.cs : +14 -8

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detetcted.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@OnedgeLee
Copy link
Contributor Author

Rebased onto main branch

Libplanet automation moved this from Review in progress to Reviewer approved Jun 28, 2022
@limebell limebell merged commit bc98bec into planetarium:main Jul 4, 2022
Libplanet automation moved this from Reviewer approved to Done Jul 4, 2022
@OnedgeLee OnedgeLee deleted the feature/fix-iceserver_uri_parser branch July 18, 2023 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to user-facing APIs Extra Small good first issue Good for newcomers
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Account for multiple :s in Uri for IceServer
3 participants