On Wed, Jul 1, 2009 at 9:55 PM, Per Ejeklint<[email protected]> wrote: > I totally agree with Nitin. Check membership on entrance, not exit. :-) > > +1 for blocking of invalid unicode at input. > > /Per >
To patch this you could just patch the ?JSON_DECODE macro to attempt an encode. If it doesn't fail ?JSON_ENCODE we can let it save. Patches welcome and it shouldn't be too hard. Cheers, Chris > > 1 jul 2009 kl. 21.49 skrev Nitin Borwankar: > >> It seems backward ( I am probably missing something huge) to not validate >> it on input. If you catch all the bad stuff going in you're less likely >> (except when you're doing internal transformations) to have bad stuff there >> in the first place and you can save yourself validations on the way out. >> >> Nitin > > -- Chris Anderson http://jchrisa.net http://couch.io
