'Best practice to limit DB text field just to prevent harm [closed]
There are some blog-articles in project I work, and,
I guess, its text field should be limited somehow
(probably it would be a JSON field one day)
There are no limitations in sense of domain - user can write as much as he wants, but, just to prevent DB harm by hack-attacks with uncommonly huge amounts of text, guess, some limit is needed.
As SO Q/A says:
- PostgreSQL limit text field with 1GB Is there a maximum length when storing into PostgreSQL TEXT
- http POST limits depend on browser (2GB - 4GB) https://serverfault.com/questions/151090/
- By rumors, Nginx's default
client_max_body_sizeis 1MB
So, how to deal with all of that?
Probably, there are some practice like: "Just limit it with million chars in app-lvl and don't worry"?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
