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 2 commits into from Jan 7, 2019


Copy link

@tiangolo 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



  • 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>
Copy link

@codecov 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

Copy link

@samuelcolvin 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
7 checks passed
Copy link
Collaborator Author

@tiangolo tiangolo commented Jan 7, 2019

Awesome, thanks!

@tiangolo tiangolo deleted the 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
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants