Skip to content

Commit

Permalink
Plugin Directory: Plugin Check: Allow plugin check to block plugin su…
Browse files Browse the repository at this point in the history
…bmissions.

This will output a message of `Results of Automated Plugin Scanning: Fail` along with the failures and not store the upload.

If an upload is successful, but warnings were generated, they will be appended to the success message for fixing.

See #7778.


git-svn-id: https://meta.svn.wordpress.org/sites/trunk@14089 74240141-8908-4e6f-9713-ba540dce6ec7
  • Loading branch information
dd32 committed Oct 1, 2024
1 parent 0c9512e commit 1410369
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ public function check_plugin() {
$html .= __( 'Note: While the automated plugin scan is based on the Plugin Review Guidelines, it is not a complete review. A successful result from the scan does not guarantee that the plugin will be approved, only that it is sufficient to be reviewed. All submitted plugins are checked manually to ensure they meet security and guideline standards before approval.', 'wporg-plugins' );

// If the upload is blocked; log it to slack.
if ( ! $verdict || true ) { // TODO: Temporarily logging all to slack, as it's not output to the submitter.
if ( ! $verdict ) {
// Slack dm the logs.
$zip_name = reset( $_FILES )['name'];
$failpass = $verdict ? ':white_check_mark: passed' : ':x: failed';
Expand Down Expand Up @@ -818,13 +818,6 @@ public function check_plugin() {
notify_slack( PLUGIN_CHECK_LOGS_SLACK_CHANNEL, $text, wp_get_current_user(), true );
}

// TODO: Payload to always pass, and not show anything to the submitter, temporary.
return [
'verdict' => true,
'results' => $results,
'html' => '',
];

// Return the results.
return [
'verdict' => $verdict,
Expand Down

0 comments on commit 1410369

Please sign in to comment.