Skip to content
Snippets Groups Projects
Commit c6e6293b authored by stuebinm's avatar stuebinm
Browse files

print aeson warning to stderr, not stdout …

parent 95323a5c
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,7 @@ import LintConfig (LintConfig (..), patch) ...@@ -21,6 +21,7 @@ import LintConfig (LintConfig (..), patch)
import Types (Level (..)) import Types (Level (..))
import Util (printPretty) import Util (printPretty)
import WriteRepo (writeAdjustedRepository) import WriteRepo (writeAdjustedRepository)
import System.IO (hPutStrLn, stderr)
-- | the options this cli tool can take -- | the options this cli tool can take
data Options = Options data Options = Options
...@@ -87,7 +88,7 @@ printLB a = putStrLn $ C8.unpack $ LB.toStrict a ...@@ -87,7 +88,7 @@ printLB a = putStrLn $ C8.unpack $ LB.toStrict a
-- cf. https://frasertweedale.github.io/blog-fp/posts/2021-10-12-aeson-hash-flooding-protection.html -- cf. https://frasertweedale.github.io/blog-fp/posts/2021-10-12-aeson-hash-flooding-protection.html
aesonWarning :: IO () aesonWarning :: IO ()
aesonWarning = case coercionToHashMap of aesonWarning = case coercionToHashMap of
Just _ -> putStrLn Just _ -> hPutStrLn stderr
"Warning: this program was compiled using an older version of the Aeson Library\n\ "Warning: this program was compiled using an older version of the Aeson Library\n\
\used for parsing JSON, which is susceptible to hash flooding attacks.\n\ \used for parsing JSON, which is susceptible to hash flooding attacks.\n\
\n\ \n\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment