This repository was archived by the owner on Sep 24, 2018. It is now read-only.
Repository navigation
#2616 boolean validation - #2704
Merged
BE-Webdesign merged 4 commits intoSep 17, 2016
Merged
Conversation
This adds relatively robust validation/sanitization for the REST API. Boolean values can be translated from booleans, strings, and integers.
Current coverage is 94.32% (diff: 95.23%)@@ develop #2704 diff @@
==========================================
Files 11 11
Lines 3648 3667 +19
Methods 173 173
Messages 0 0
Branches 0 0
==========================================
+ Hits 3441 3459 +18
- Misses 207 208 +1
Partials 0 0
|
kadamwhite
approved these changes
Sep 16, 2016
kadamwhite
left a comment
Contributor
There was a problem hiding this comment.
I think this looks good, all cases I can think of for the boolean parameter validation look to be covered and the rest_is_bool method seems to be doing its job. Provisionally approving.
joehoyle
approved these changes
Sep 16, 2016
Member
Author
|
I merged it because it was approved by both of you and somehow you couldn't merge it, the button worked for me so I just clicked it, hopefully that is not bad form. |
This was referenced Sep 17, 2016
Contributor
|
@BE-Webdesign No that's great; thanks for taking the initiative. I hope that "approve PR" doesn't mean "only the submitter can merge"; that would be counterintuitive. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2616, and #2633, In addition #2630 can be closed. Adds boolean validation/sanitization, to handle integers, strings, and booleans.
'false'and'0'and integer0will evaluate tofalse. The opposite of those values istrue.