Giter Site home page Giter Site logo

seands / disable-wordpress-external-host-check Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 16 KB

Disable WordPress's external host check security feature to allow sideloading media etc. from a local machine

License: GNU General Public License v3.0

PHP 100.00%

disable-wordpress-external-host-check's Introduction

Disable WordPress external host check

Disable WordPress's external host check security feature to allow sideloading media etc. from a local machine.

When you import media from another WordPress (or different platform), the files are retrieved over HTTP using WordPress's WP_Http class. This provides a unified interface for retrieving files, but is also in some cases unnecessarily restrictive on what constitutes a valid URL. For example, network hosts defined on the 127, 10, 0, 172 or 192.168 IP blocks are automatically considered to be "local" and therefore rejected, which rules out sideloading media from another host on the network with such an IP. This is true also for hosts which resolve to those IP ranges. The relevant source code is part of wp_http_validate_url.

This plugin simply disables the IP block check, so that all URLs, even local ones, are allowed regardless of the IP address.

Note that this does not disable other security features which check for malformed URLs, exposed passwords, ports other than 80, 443 and 8080, etc.

Credits

Sean Leavey
https://github.com/SeanDS
[email protected]

disable-wordpress-external-host-check's People

Contributors

seands avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.