Re:htmx 2.0.0-beta1
by Nextgrid on Sunday March 17, 2024 @02:47PM
(#39736881)
Nothing specific to React but having both client-side and server-side validation means that any deficiencies of server-side validation will be concealed and go unnoticed (until exploited by an attacker).
In contrast, server-side validation only means any validation deficiencies are more likely to be discovered during legitimate usage since the client-side validation is no longer covering up for it.
Re:htmx 2.0.0-beta1
by orphea on Sunday March 17, 2024 @03:03PM
(#39737025)
I think you have it backwards. You _first_ do server-side validation, then you add client-side validation _as an optimization_, so that invalid requests are not even sent.
Re:htmx 2.0.0-beta1
by Nextgrid on Sunday March 17, 2024 @09:07PM
(#39739583)
My point is that once you do that any subsequent deficiencies in your server-side validation become invisible during normal usage (because the client-side validation will prevent you from even trying).
In contrast, server-side validation only means any validation deficiencies are more likely to be discovered during legitimate usage since the client-side validation is no longer covering up for it.