by userbinator 8 hours ago The question can be reduce to "who do the length validation".At the boundary where untrusted input becomes trusted. This is commonly known as the sanitisation/validation layer.