0

Using Drupal 7.69

There's one node (page) on my website that I'm trying to edit. When I click on edit it opens up this page but only shows the html source code instead of showing the other editor. When I try and click on 'plain text editor' at the bottom, nothing happens.

edit page only showing html source code

When I try and save an edit (even after editing nothing on the node), I get a 403 error.

403 error after trying to edit image

Nothing in the Drupal error log. It's a pretty basic page with a button, some images, some text.

I've tried editing other nodes (no issues), and have tried creating a new node and editing that, with no issues as well.

So it's only this one page that I can't edit. Any ideas on what's wrong, or how to fix this?

EDIT: So after a bunch of testing and trying to rebuild the page line by line, I found out I get the 403 error only when a new line on the node starts with "Location:" (including the colon). I don't get an error when a new line starts with any other word with/without a colon, or if the new line starts with "Location"/"Location -"/etc, or if "Location:" is in a line but not at the start of the line. Strange...

4
  • Something similar happened with one of our sites awhile back and in that case ModSecurity was the culprit. What happens if you delete all of the text in the body field and save? (Of course you should back it up somewhere first.) Commented Feb 19, 2020 at 7:29
  • @othermachines I've edited my post with more information, the phrase "Location:" at the start of the line is causing the 403 error (for some reason)
    – josh
    Commented Feb 20, 2020 at 0:13
  • 1
    Location: is used to redirect in http. I would guess your hosting company, IT network admin, or someone, is running some sort of proxy/filter that is trying to block shenanigans, and isn't as clever as it thinks it is. Commented Feb 20, 2020 at 1:31
  • This isn't my usual wheelhouse but it sounds like the submission is being blocked by modsecurity. I would look into disabling modsecurity rules or whitelisting IPs (I believe the latter is only effective if your content editors are working within an internal network with static IPs). Commented Feb 20, 2020 at 7:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.