Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#48311 new defect (bug)

Page removal in wp clean install "The response is not a valid JSON response"

Reported by: motmat's profile motmat Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.2.4
Component: Editor Keywords: needs-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

Question to hosting provider support

bug launch conditions: Clean wp install today, basic Theme, no plugins.
Created test site can not be removed from editor - "The response is not a valid JSON response" response."
The page can only be removed from wp pages overview.

Sorry for my talk awkwardness (i have no idea what is it about just forwarding)
Vladimir
extasica.com

bug report cause from hosting provider:

we found a bug in WordPress itself, when pressing the "Remove" button is sending a POST request to the webserver with JSON data, but they do not have the correct end. The data includes an EOF character (the end of the file - this should end the data), followed by another character - n (new line). Therefore, the JSON parser crashes in our Modsecurity application firewall and the application receives a "The response is not a valid JSON response" response.

Original Czech hosting provider text
"nalezli jsme chybu v samotné aplikaci WordPress, kdy po stisknutí tlačítka "Odstranit" je odeslání POST požadavek do webserveru s JSON daty, která však nemají správný konec. Součástí dat je znak EOF (konec souboru - tímto by měla data končit), za kterým ale následuje ještě další znak - n (nový řádek). Z toho důvodu JSON parser v našem aplikačním firewallu Modsecurity zhavaruje a aplikace obdrží odpověď "The response is not a valid JSON response".

Change History (1)

#1 @SergeyBiryukov
5 years ago

  • Component changed from General to Editor
  • Description modified (diff)
  • Version changed from trunk to 5.2.4

Hi there, welcome to WordPress Trac! Thanks for the report.

Therefore, the JSON parser crashes in our Modsecurity application firewall and the application receives a "The response is not a valid JSON response" response.

I could not reproduce the issue on a clean install, but wanted to note that ModSecurity is known to cause weird issues like this, depending on configuration and environment.

Note: See TracTickets for help on using tickets.