Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator][CidrValidator] Fix error message forOutOfRangeNetmask validation#58387

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:7.1fromFabdouarrahmane:7.1
Oct 9, 2024

Conversation

@Fabdouarrahmane
Copy link
Contributor

@FabdouarrahmaneFabdouarrahmane commentedSep 25, 2024
edited
Loading

QA
Branch?7.1
Bug fix?yes
New feature?no
Deprecations?no
LicenseMIT

Description

This pull request addresses an issue with the error message generated for the OutOfRangeNetmask validation in the CidrValidator. The previous implementation allowed a maximum netmask of 128, which is incorrect for IPv4 addresses. The maximum should be set to 32 instead.

Changes Made:

  • Updated the error message parameters in the CidrValidator to reflect the correct maximum netmask for IPv4.
  • Modified the corresponding test to ensure that it accurately verifies the expected behavior.

Benefits:

This fix ensures that users receive accurate feedback when providing invalid CIDR notations, which enhances the overall reliability of the validation process.

Testing:

All existing tests have been run, and the new behavior has been verified. The tests confirm that the error message now correctly states the maximum allowed netmask for IPv4 addresses.

Feel free to adjust any part of it to better fit your style or add any additional information you think is relevant!

@carsonbotcarsonbot added this to the7.1 milestoneSep 25, 2024
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 7.2 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbotcarsonbot changed the titleFix CidrValidator: Corrected error message for OutOfRangeNetmask vali…[Validator] Fix CidrValidator: Corrected error message for OutOfRangeNetmask vali…Sep 25, 2024
@nicolas-grekasnicolas-grekas changed the title[Validator] Fix CidrValidator: Corrected error message for OutOfRangeNetmask vali…[Validator] Fix CidrValidator: Corrected error message for OutOfRangeNetmask validationSep 28, 2024
@OskarStarkOskarStark changed the title[Validator] Fix CidrValidator: Corrected error message for OutOfRangeNetmask validation[Validator][CidrValidator] Fix error message forOutOfRangeNetmask validationSep 30, 2024
@nicolas-grekas
Copy link
Member

Thank you@Fabdouarrahmane.

Fabdouarrahmane reacted with thumbs up emoji

@nicolas-grekasnicolas-grekas merged commitb6a9fe3 intosymfony:7.1Oct 9, 2024
8 of 10 checks passed
@fabpotfabpot mentioned this pull requestOct 27, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasAwaiting requested review from nicolas-grekas

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees

No one assigned

Projects

None yet

Milestone

7.1

Development

Successfully merging this pull request may close these issues.

5 participants

@Fabdouarrahmane@carsonbot@nicolas-grekas@xabbuh@OskarStark

[8]ページ先頭

©2009-2025 Movatter.jp