Increase the allowed size of URIs

Increase the allowed size of Post.object_uri and Post.url from 500 characters to a more reasonable 2048. See https://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers.
This commit is contained in:
Tyler Kennedy 2022-12-17 22:20:51 -05:00 committed by GitHub
parent b6a8737d2e
commit fc79551656
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -180,7 +180,7 @@ class Post(StatorModel):
local = models.BooleanField()
# The canonical object ID
object_uri = models.CharField(max_length=500, blank=True, null=True, unique=True)
object_uri = models.CharField(max_length=2048, blank=True, null=True, unique=True)
# Who should be able to see this Post
visibility = models.IntegerField(
@ -197,7 +197,7 @@ class Post(StatorModel):
summary = models.TextField(blank=True, null=True)
# The public, web URL of this Post on the original server
url = models.CharField(max_length=500, blank=True, null=True)
url = models.CharField(max_length=2048, blank=True, null=True)
# The Post it is replying to as an AP ID URI
# (as otherwise we'd have to pull entire threads to use IDs)