-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mb_substr() should be used on strings, if available (2.0 and master branches) #727
Comments
You're absolutely right, are you willing to open a PR to fix the issue? |
It looks like 2.0 branch requires mbstring so we don't need conditional logic there? Except, there is some already - |
Since we're requiring |
On the 2.0 branch it looks like there is a hardcoded message limit? I don't think that's a good idea, based on my experience with apps that dump huge SQL query strings (along with other useless stuff) into the message, which was needed to debug the bad SQL. This required me to set message limit to as much as 8192 characters, which Sentry server is perfectly happy to accept. |
@HazAT what do you think about this? Should we make the message limit customizable? |
…y#750); use mb_substr (refs getsentry#727)
…y#750); use mb_substr (refs getsentry#727).
) * new Raven_Compat::substr() method calls mb_substr() if available fixes #727 * fix tests to support multibyte truncation. * add Raven_Compat::strlen() method and cleanup Serializer
There are places in the 2.0 and master branches where strings are truncated using substr(), which results in invalid UTF-8 if a multibyte character is truncated. Strings should be truncated by mb_substr() if the function is available.
See e.g.
The text was updated successfully, but these errors were encountered: