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

Max length for db fields too small - 2048 #288

Closed
matteo-s opened this issue Dec 12, 2023 · 2 comments
Closed

Max length for db fields too small - 2048 #288

matteo-s opened this issue Dec 12, 2023 · 2 comments
Assignees

Comments

@matteo-s
Copy link

Various fields which are supposed to contain JWTs are set to a maxLength of 2048 which is too small for any real usage.
For example in fetched entity

field=models.CharField(default="", max_length=2048),

The smallest valid JWT we can build which contains federation metadata + rp metadata is 2083, but also the examples you distribute with this project are "over quota", like the one for relying-party.org:8001 which is 4218 characters.

If you copy/paste the jwt in the form at http://trust-anchor.org:8000/admin/spid_cie_oidc_entity/fetchedentitystatement/add/ the backend app will break, because the input field will just truncate the JWT at 2048 and thus produce garbage which the backend tries to read as JWT, failing.

@rglauco rglauco self-assigned this Dec 13, 2023
@peppelinux
Copy link
Member

it should be changed to models.TextField

good catch @matteo-s

@rglauco
Copy link
Collaborator

rglauco commented Dec 14, 2023

fixed in #291

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

No branches or pull requests

3 participants