dcasia / column-toggler

A Laravel Nova package that allows you to hide/show columns in the index view.
MIT License
40 stars 5 forks source link

UTF-8 Support added for encode() - decode() methods #6

Closed batinmustu closed 11 months ago

milewski commented 11 months ago

Thanks for this change; it seems harmless, but could you please explain what the issue was and how it breaks without encodeURIComponent or escape? As I understand it, once the value is base64 encoded, it is URL-safe. I'm failing to see what possible issue this could have caused. Also, once the value reaches the PHP code at https://github.com/dcasia/column-toggler/blob/main/src/ColumnTogglerTrait.php#L41, is there no need to URL-decode or escape it again?

batinmustu commented 11 months ago

Created PR, security vulnerability etc. It's not about. Encrypted data stored on local storage does not support UTF-8 characters without encodeURIComponent and escape methods. We want to use your package in our project. However, this issue poses a problem for us. I created a PR by adding these methods to benefit from subsequent updates and to prevent other users from encountering a similar problem.

milewski commented 11 months ago

Okay I see, https://stackoverflow.com/a/7726324 basically if you have any field with the attribute containing invalid UTF-8 Characters like tür it breaks