Recently users are getting an error when they try to upload profile picture on my website.
The UI only says ERROR in red writing with no explanation. When checking the log I see that I get a 455 from the firewall on the admin-ajax.php.
In simply.com control panel the rule blocking the request is “Malformed multipart body”.
I don’t know if simply.com made changes to the firewall or something happened to the plugin. I have tried to disable other plugins, changing theme, rolling back to previous version etc. – nothing seems to be working.
We are having the exact same problem with our site, also with simply.com as the provider. Seems to have started a few days ago. It’s also an error 455 from admin-ajax.php, when trying to upload anything. I’ve been in touch with simply.com over the past few days and they replied with “Malformed multipart body” and that it seems to be an issue with the plugin Ultimate Member. Sadly I have nothing further to add, but really hoping for a solution, as this hinders our work significantly.
Images that I have sent are the same as yours but without an error. I’ve attached images to clarify what a boundary is in a multipart request. Boundaries are valid in our request, but some firewalls may not recognize it. This issue isn’t related to other plugins. It’s a problem with the firewall configuration.
Ultimate Member uses an upload library (jquery.uploadfile.js), which adds an extra, empty field to the request for every upload. The field has no name and contains the text undefined:
The bug occurs in the library’s serializeData(): dynamicFormData returns an empty object {} by default, which is serialized to an empty text string, and the result is a field with an empty name and the value undefined. This happens on every upload, regardless of browser and file type.
Yes that’s right, there is an empty field undefined by the end of the upload.
You can try this code snippet, which will remove the undefined with empty name.
I have tested this code snippet at my site even if the bad undefined is ignored by my hosting server and with the code snippet active the upload looks clean.
I asked a lead developer to update or replace the “jQuery Upload File plugin” library. Although an empty field is not an error for HTTP, it is better to get rid of it to avoid such conflicts.
As a temporary solution you may try update this library manually. Download the latest version from GitHub and replace these files: – /assets/libs/fileupload/jquery.uploadfile.js – /assets/libs/fileupload/jquery.uploadfile.min.js
This reply was modified 3 days, 3 hours ago by Yurii.