plugin-update-checker/Puc
Yahnis Elsts 3ceae95c4f Don't allow autoupdate = true unless you call $checked->allowAutoupdateField() first.
See #602. The "autoupdate" field is supported by WP core and could be useful, but it's also a potential security flaw since it would let someone who compromised the update source/API to remotely trigger an automatic update - even if the plugin developer didn't intend to allow fully automatic updates. This commit attempts to mitigate that by requiring the developer to explicitly call allowAutoupdateField() to opt-in first.

You can also use the new custom filter 'autoupdate_field_allowed' to do this on a case-by-case basis. The filter gets the update object as the second argument, so you can decide if you want to allow it for a specific update. Note that you can't use this filter to set the "autoupdate" field. The filter just controls whether the "autoupdate" field will be left as-is or automatically set to `false`.
2026-03-05 11:43:35 +02:00
..
v5 Bump version number to 5.6 2025-05-20 15:20:21 +03:00
v5p6 Don't allow autoupdate = true unless you call $checked->allowAutoupdateField() first. 2026-03-05 11:43:35 +02:00