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 BaseConfig max_anystr_length default to fixed number to None #350

Merged
merged 2 commits into from Jan 7, 2019

Conversation

Projects
None yet
2 participants
@tiangolo
Copy link
Contributor

tiangolo commented Jan 5, 2019

Change Summary

Make BaseConfig by default have min_anystr_length and max_anystr_length set to None.

All the discussion/motivation is in issue #349 .

Related issue number

#349

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • HISTORY.rst has been updated
    • if this is the first change since a release, please add a new section
    • include the issue number or this pull request number #<number>
    • include your github username @<whomever>
@codecov

This comment has been minimized.

Copy link

codecov bot commented Jan 5, 2019

Codecov Report

Merging #350 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff          @@
##           master   #350   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          14     14           
  Lines        1824   1824           
  Branches      356    356           
=====================================
  Hits         1824   1824
@samuelcolvin

This comment has been minimized.

Copy link
Owner

samuelcolvin commented Jan 7, 2019

I agree.

The original rationale was to avoid dos like attacks by avoiding someone submitting {'a': 'x' * 1e20} etc, but that should really be taken care of by client_max_body_size or equivalent. This check wasn't good anyway since it didn't check lists or multiple strings.

@samuelcolvin samuelcolvin merged commit 32d5cdc into samuelcolvin:master Jan 7, 2019

3 checks passed

codecov/project 100% (+0%) compared to 3c4c163
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details
@tiangolo

This comment has been minimized.

Copy link
Contributor Author

tiangolo commented Jan 7, 2019

Awesome, thanks!

@tiangolo tiangolo deleted the tiangolo:baseconfig-max-any-none branch Jan 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.