haskell-tls / hs-certificate

Certificate and Key Reader/Writer in haskell
60 stars 57 forks source link

Avoid error inside a pure value, and use instead the IO Monad's fail #116

Closed berdario closed 2 years ago

berdario commented 4 years ago

Otherwise, to catch this runtime error, you'd be forced to use something like Control.Exception.evaluate

hasufell commented 2 years ago

This is not the only place: https://github.com/vincenthz/hs-certificate/blob/7041244d0dd3946d96af66611b2760d2478e055f/x509-system/System/X509/MacOS.hs#L23

I'm seriously concerned to see such novice issues in a security critical library.

vincenthz commented 2 years ago

Thanks @berdario, however I went with the other PR #125 prefering the use of throwIO instead of fail.

@hasufell and I'm seriously concerned how many dicks such as yourself, are littering the haskell community, ready for judgmental comments and insults like the one above. maybe you should ask for your money back. oh wait.