Dnia 2021-02-03, o godz. 14:04:42
"'Axel Wagner' via golang-nuts" <golang-nuts@googlegroups.com> napisaƂ(a):

> Maybe it helps to point out that the statements "you should design your
> system to thoroughly validate input and reject it if it's invalid" and
> "there are contexts, where trying to be as flexible as possible in trying
> to make sense of an input" can both be true.

Of course that often both are desired. Just rarely we can attain both at once.
Thats why I emphasized "in this (security) context".

As for the OP problem: the best would be to have a flexible decoder that also
returns an indicator what unexpected format discrepancy it forgave. This would
be easy to do for static data; I see no easy solution for such signaling on 
streams
though.

TC,

-- 
Wojciech S. Czarnecki
 << ^oo^ >> OHIR-RIPE

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20210203193627.23360769%40xmint.

Reply via email to