tngan / samlify

Node.js library for SAML SSO
https://samlify.js.org
MIT License
601 stars 214 forks source link

Wrap inflation errors #500

Open mastermatt opened 1 year ago

mastermatt commented 1 year ago

Feature Request in PR form.

pako has a tendency to throw obscure error strings e.g. "too many length or distance symbols", which can make gracefully handling bad input difficult when an error is thrown from parseLoginRequest. This wraps the inflation step to allow throwing a dedicated error with a static message for inflation issues, while still making the original error available.