Skip to content

[bug] Local-only installs (failed trying to send a request to the Font Awesome API server) #296

@maltfield

Description

@maltfield

This is a bug report. The plugin completely and totally fails on servers with WP_HTTP_BLOCK_EXTERNAL enabled

What?

On servers with WP_HTTP_BLOCK_EXTERNAL enabled, this plugin will not activate.

Upon clicking Activate, this plugin displays the following message, and the plugin fails to activate

Your WordPress server failed trying to send a request to the Font Awesome API server.

Steps to reproduce

To reproduce, install a fresh copy of the latest stable version of wordpress, and add the following to the wp-config.php file

define( 'WP_HTTP_BLOCK_EXTERNAL', true );

Then, download this plugin's latest stable release, extract the zip, and copy the font-awesome folder into wp-contents/plugins/ folder

In the wp dashboard in the web browser, go to the Plugins page, and click Activate under Font Awesome.

You'll see this error

Your WordPress server failed trying to send a request to the Font Awesome API server.

Why?

Security-hardened web browsers enable WP_HTTP_BLOCK_EXTERNAL to prevent their webserver from initiating requests, which significantly reduces the attack surface to secure a wordpress install.

For this reason, it's important to support a configuration where the plugin can serve requests, but it cannot initiate them

Solution

The solution is for this plugin to ship with a (stale) version of font awesome, which it will fall-back to providing to the user, if it's found that the plugin cannot initiate requests to the Internet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions