SUSE-Enceladus / suse-rancher-setup

Simple, usable web application for deploying complex applications to the cloud; wrapping cloud native SDK/CLIs
GNU General Public License v3.0
9 stars 1 forks source link

Limit flash error message sizes to not overflow cookie session #214

Closed bear454 closed 1 year ago

bear454 commented 1 year ago

Flash messages are stored in the session; in Lasso's case the session is stored in a cookie, and therefore limited to a maximum of 4K. If an error message is excessively long, it can cause a cookie overflow error, blow the session, and force Rails to throw a 500 Application Error, which loses the original error posted to the flash. Better to preserve a smaller portion of the error (a 1000 characters should be enough) than lose it altogether.