Unofficial Hacker News companion — get notified on comment replies, and more.

Elephant in the Server Room: >50% of WordPress Sites Run PHP That's EOL by Jan (opens external site)

284 points by xadz 3 days ago | adamgreenough.net | 132 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (10)

  1. The maintainers are clowns. For example one of first things many installs need to do is to set it up to support X-Forwarded-For header. There are no options for it in WP. There were multiple tickets asking for it. It's about 5 lines of code ("if this header from the loadbalancer/rp IP, set host ip to this header").

    Every time they refused with "oh buh it's not RFC, no matter near every piece of software does it". For DECADE

    When it got standardised into RFC (which was DECADE ago) guess whether they implemented it? Of course not. They started whining "oh but it's from the internet header, someone configuring it wrong might let people spoof IP". Sensible defaults that user could then set up for their env ? who needs that.

    Wordpress project is a history of developer incompetency for last 23 years

    Replies (4)
    1. Such pristine example of classic developer being unkind know it all
    2. This is a sane approach. Your webserver can and should handle X-Forwarded-For, not some PHP application. Use apache2 with mod_remoteip and you will get the client IP in REMOTE_ADDR. If you don't do that any client can send XFF.
      Replies (1)
      1. That's so typical old PHP developer mind of "let's have half of the app written in mod_rewrite and web server config files".
        Replies (3)
        1. Typical PHP developer has no information which load balancer to trust. It is not his job.
        2. It's not. mod_remoteip != mod_rewrite, stop shifting the topic. Besides that, if you have Apache (or nginx, doesn't really matter) you want mod_remoteip otherwise logs are not showing the correct IP.
          Replies (1)
          1. Ops here, this is difference between PHP and most other languages. All other major languages I can think of are selfhosting and extremely likely to have Ingress Proxy between them and global internet. Thus, their web server is extremely simple and they would handled X-Forwarded-For in their code.

            PHP for various reasons still ships will full blown webserver and PHP developers sometimes do screw around with their local Apache. To larger team doing DevOps, this is a path to absolute madness.

        3. And that is so typical new PHP developer to try to jam infra tasks into the web application level and then wonder why their buggy site slows to a crawl.
    3. But they instead have time to fast track a feature no one needs and will cause issues when it’s turned on by default as pointed out by many Wordpress veterans. Talking about the new /random url that will randomly redirect to some content.

      There’s a lot of really poorly designed plugins that improperly use custom post types as storage and assume complex slugs are safe. Ran into one client that had a plugin that generated invoice urls. If they don’t disable this new redirect they will be exposing customer information.

      It also seemed to also apply to uploaded media last I checked. That’s one I really hope they filter out by default.

    4. Of all the weird things with Wordpress .. why would you want to pick that one?

      Making things convenient for your particular use case but a potential security issue for many others is not a good tradeoff, and the developers' position is reasonable here.

      It is not strange that you have to tell your web server about your load balancer (as well as your certificate name, where to send logs, your application path etc.). For the vast majority of users, there's nothing more to it.

      It would be a lot more weird if applications ignored this information and parsed headers with their own logic.