WP Manifestindependent plugin directory
manifest / content / acf-background

Advanced Custom Fields: Background WP Registry grade C-. High-severity findings · 1 findingWP RegistryHigh-severity findings · 1 findingOpen the reportC-

Background field include all background css attribute and compatible with Reyhoun SassWatcher plugin.

★ 24stars
v1.6.0latest · 11 years ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/reyhoun/acf-background/archive/refs/heads/master.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

ACF Background Field

enter image description here

Background field include all background css attribute and compatible with Reyhoun SassWatcher plugin.


Structure

  • /css: folder for .css files.
  • /js: folder for .js files
  • /lang: folder for .pot, .po and .mo files
  • acf-background.php: Main plugin file that includes the correct field file based on the ACF version
  • acf-background-v5.php: Field class compatible with ACF version 5
  • acf-background-v4.php: Field class compatible with ACF version 4
  • readme.txt: WordPress readme file to be used by the wordpress repository

Compatibility

This ACF field type is compatible with:

  • ACF 5
  • ACF 4
  • Reyhoun SassWatcher

Installation

  1. Copy the acf-background folder into your wp-content/plugins folder
  2. Activate the Background plugin via the plugins admin page
  3. Create a new field via ACF and select the Background type
  4. Please refer to the description for more info regarding the field type settings

Subfields

  • Repeat
  • Attachment
  • Size
  • Position
  • Clip
  • Origin
  • Color Picker
  • RGBA Color Picker
  • Upload Image
  • External Image URL

Releases

2 releases.

Tag
Published
v1.6.0 latest
Nov 19, 2014 11 years ago
Nov 1, 2014 11 years ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

C- grade

Security

Advanced Custom Fields: Background 1.6.0 · audited by WP Registry

High-severity findings.

1 high
Audited release
1.6.0
Findings
1
Worst severity
high
Content hash
e3de9a19d699320e73346682…

Findings

  • high Stored XSS via unsanitized ACF background field values in editor HTML

    xss_stored

    The Background field type never sanitizes on save and never escapes on output. ACF5 leaves update_value unimplemented (raw array stored); ACF4 update_value() returns $value unchanged. render_field() then print/echoes attacker-controlled subfields into HTML attributes and a style attribute: background-color and background-text in <input value="..."> (including the RGBA path, which copies the original string into ext_value['rgba'] / ext_value['he-op']['hex']), background-image in input value plus <a href>, media.thumbnail in <img src>, and getCSS() which interpolates every non-media value as `key:value;` or `background-image:url('value')` into the previewer's style="...". A Contributor who can edit a post (or anyone submitting an acf_form / user profile that includes this field) can save a value such as `"><script>alert(1)</script>` or `x')"><img src=x onerror=alert(1)>`; the next administrator or editor who opens the object executes that script in wp-admin, bypassing unfiltered_html because ACF stores this as meta rather than kses'd post_content. The same sinks exist in acf-background-v4.php create_field()/getCSS() (e.g. lines 374, 549-573, 598, 607-621). The plugin has no frontend CSS printer of its own. Upstream last commit is 2014-11-26 (tag v1.6.0 dated 2014-11-19); there is no escaping helper anywhere in the three PHP files.

    acf-background-v5.php:564-583,627-660,672-680,729-744

    Recommendation

    Sanitize on save (hex/rgba for colors, esc_url_raw for image/thumbnail URLs, allowlist for repeat/size/position/clip/origin/attachment). Escape every echo: esc_attr() on input values/ids/names/classes, esc_url() on href/src, and build the preview style from allowlisted property names plus sanitized values (no raw concatenation). Implement update_value() instead of the identity/passthrough. Because this add-on has not been maintained since 2014, prefer replacing it with ACF native color/image fields or a maintained equivalent rather than running it on current WordPress.

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.