gramener / comicgen

Add comics to your website or app with an API
https://gramener.com/comicgen/
MIT License
597 stars 93 forks source link

Comicgen crashes on invalid input #115

Closed sanand0 closed 2 years ago

sanand0 commented 2 years ago

Here is a real-life request that crashes Comicgen:

curl -i 'localhost:3000/comic?name=humaaans&head=pony&side=sitting&bottom=sweat-pants&body=long-sleeve&face=%B86314&hair=%050505&pantRight=%BFBA22&pantLeft=%BF2266&ext=png'

This is because of invalid / unescaped characters in the color code. See issue in sharp

Another issue that emerged on 27 Oct 2021 was Input buffer contains unsupported image format.

In either case, we need to handle exceptions generated by sharp