Open
Description
- For each metabox registered with
add_meta_box
, flag if the savecallback
does not contain a cap check.
If the callback is a method like array( $obj, 'method' )
, it will be to difficult to check programatically. However, if the method is for $this
or if a bare global function name or closure is used, then it should be straightforward to locate the function in the same file.
PHPUnit would be a better way to check if a function calls current_user_can
, as a test could run and then check to see if the map_meta_cap
hook ran during the function's execution.
Per the VIP code review guidelines:
Capability checks need to validate that users can take the requested actions.