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

Disable 255 chars length limit for redirect uri (#902) #903

Conversation

shaddeus
Copy link
Contributor

@shaddeus shaddeus commented Dec 11, 2020

Fixes #902

Description of the Change

Changed model field AbstractGrant.redirect_uri (from CharField(max_length=255)) to TextField().

Added a pytest for AbstractGrant model. Unfortunately it works effective only with database engines that limits strings with VARCHAR(255) data type) - not SQLite. See documentation.

Creates BaseTestModels class with a testing user. Uses TestModels, TestCustomModels, TestGrantModel, TestAccessTokenModel, TestRefreshTokenModel and TestClearExpired.

Checklist

  • PR only contains one change (considered splitting up PR)
  • unit-test added
  • documentation updated
  • CHANGELOG.md updated (only for user relevant changes)
  • author name in AUTHORS

RFC 7230 recommends to design system to be capable to work with URI at least
to 8000 chars long. This commit allows handle redirect_uri that is over 255
chars.

Fixes issue jazzband#902.
@coveralls
Copy link

coveralls commented Dec 11, 2020

Pull Request Test Coverage Report for Build 1523

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 95.014%

Totals Coverage Status
Change from base Build 1520: 0.0%
Covered Lines: 1334
Relevant Lines: 1404

💛 - Coveralls

@MattBlack85
Copy link
Contributor

MattBlack85 commented Dec 16, 2020

@shaddeus we need an entry for the CHANGELOG(and your name in AUTHORS if it's not already there)

@shaddeus
Copy link
Contributor Author

@MattBlack85 Yes, I'll add an entry into CHANGELOG.
Really? Should I write me to a list of AUTHORS? It would be a honor.

@n2ygk
Copy link
Member

n2ygk commented Dec 16, 2020 via email

@MattBlack85 MattBlack85 merged commit f344b06 into jazzband:master Dec 18, 2020
@MattBlack85
Copy link
Contributor

thanks for your contribution @shaddeus !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A limit on redirect_uri only up to 255 chars
4 participants