-
Notifications
You must be signed in to change notification settings - Fork 125
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
2011 cidr host factory token #2012
Conversation
5500114
to
03a212f
Compare
@@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
- `GET /resources` request with non-numeric delimiter (limit or offset) now | |||
returns `Error 422 Unprocessable Entity` instead of `Error 500`. | |||
[cyberark/conjur#1997](https://github.com/cyberark/conjur/issues/1997) | |||
- `POST /host_factory_tokens` request with invalid ip address or CIDR range of `cidr` parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
POST /host_factory_tokens
request which has invalid ip address or CIDR range in cidr
parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liavyona not sure the context of the text - confused by the original and @InbalZilberman's comment
In the meantime, IP is always caps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
@@ -42,6 +42,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
- `GET /resources` request with non-numeric delimiter (limit or offset) now | |||
returns `Error 422 Unprocessable Entity` instead of `Error 500`. | |||
[cyberark/conjur#1997](https://github.com/cyberark/conjur/issues/1997) | |||
- `POST /host_factory_tokens` request with invalid ip address or CIDR range of `cidr` parameter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about
POST /host_factory_tokens
request which has invalid ip address or CIDR range in cidr
parameter
03a212f
to
ae42b2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some comments
ae42b2a
to
30d8b09
Compare
30d8b09
to
7abd75e
Compare
|
||
def validate_cidr | ||
cidr = self[:cidr] | ||
unless cidr.blank? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a guard clause instead of wrapping the code inside a conditional expression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feel free to ignore this
Code Climate has analyzed commit 7abd75e and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 89.3% (0.0% change). View more on Code Climate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changelog entry LGTM :)
What does this PR do?
Now verifies that CIDR parameter in

POST /host_factory_tokens
has no invalid ip address or CIDR range valueWhat ticket does this PR close?
Resolves #2011
Checklists
Change log
Test coverage
Documentation
README
s) were updated in this PR, and/or there is a follow-on issue to update docs, or