-
-
Notifications
You must be signed in to change notification settings - Fork 38
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
Conversation widget sometimes render empty (Ajax failure) #1746
Comments
Just for reference, I filed an issue also on the HTMLPurifier library (ezyang/htmlpurifier#386), because I checked that the error is still in their GitHub code. |
After some troubleshooting, I found that issue is related to locales, and is already fixed in master branch of the HTMLPurifier library (by commit ezyang/htmlpurifier@43f49ac) but there are no public releases that include it... |
Thanks, @netdreamer! I'll keep an eye on htmlpurifier's upstream and pin to a new release. We should be able to catch the Do you have some example text (an HTML widget or an inbound HTML message) that reproduces the issue? |
Sorry @jstanden , it's not possibile for me to provide the HTML (a lot of sensitive info inside, and I don't want to alter it to be sure that the error is still there...), but I observed exactly what's going on. It is related to locale: UnitConverter->convert() receives a $length variable populated with "1200 px". But, I also found a different workaround that doesn't involve altering library code. |
We included this fix in the 10.4.6 update last month: https://cerb.ai/releases/10.4.6/ |
Hello, I found an issue on the rendering of the "Conversation" widget: sometimes it's completely blank.
By inspecting the web calls, I found out that this Ajax call for widget rendering fails with error 500:
POST /admin/ajax.php?_log=profiles.invokeTab.39.renderWidget.97"
This is the call trace in the web error log.
So, the issue is on the HTMLPurifier library used by Cerb.
The failure is in the UnitConverter.php, function "round".
There is no check that the passed value $n is really a number, before trying to to abs($n)
If, for some reason, round() is called with an invalid value, it crashes.
I don't know if there is an updated HTMLPurifier library that fixes the issue by checking values.
At the moment, I temporary fixed it by patching the function with a check:
A different workaround, if no updated library is available, would be to to check the passed values before calling HTMLPurifier_AttrDef_CSS_Length->validate() in Cerb code...
The text was updated successfully, but these errors were encountered: