[wp-trac] [WordPress Trac] #48311: Page removal in wp clean install "The response is not a valid JSON response"

WordPress Trac noreply at wordpress.org
Mon Nov 11 22:29:49 UTC 2019


#48311: Page removal in wp clean install "The response is not a valid JSON
response"
--------------------------+------------------------------
 Reporter:  motmat        |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Editor        |     Version:  5.2.4
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by SergeyBiryukov):

 * version:  trunk => 5.2.4
 * component:  General => Editor


Old description:

> 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".

New description:

 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".

--

Comment:

 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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48311#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list