Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v4.0.0 – WordPress.org Plugins official listing and hosting #201

Merged
merged 120 commits into from
Dec 10, 2023

Conversation

MichelleBlanchette
Copy link
Collaborator

No description provided.

MichelleBlanchette and others added 30 commits July 12, 2023 18:16
…sion-checker

Plugin version checker to migrate data + admin notices
… the actual Admin_Pages class for menu parent slug
@MichelleBlanchette
Copy link
Collaborator Author

Issue: Database tables are being queried before installation

This is because Automations tries to register events, but this happens before the plugin has installed the database tables:

WordPress database error: [Table 'wordpress.$automations_table' doesn't exist]
SELECT COUNT(actions.ID) FROM `wp_ptc_completionist_automation_actions` actions JOIN $automations_table automations ON automations.ID = actions.automation_id AND automations.hook_name = 'user_register'

WordPress database error: [Table 'wordpress.$automations_table' doesn't exist]
SELECT COUNT(actions.ID) FROM `wp_ptc_completionist_automation_actions` actions JOIN $automations_table automations ON automations.ID = actions.automation_id AND automations.hook_name = 'profile_update'

WordPress database error: [Table 'wordpress.$automations_table' doesn't exist]
SELECT COUNT(actions.ID) FROM `wp_ptc_completionist_automation_actions` actions JOIN $automations_table automations ON automations.ID = actions.automation_id AND automations.hook_name = 'delete_user'

WordPress database error: [Table 'wordpress.$automations_table' doesn't exist]
SELECT COUNT(actions.ID) FROM `wp_ptc_completionist_automation_actions` actions JOIN $automations_table automations ON automations.ID = actions.automation_id AND automations.hook_name = 'wp_insert_post'

WordPress database error: [Table 'wordpress.$automations_table' doesn't exist]
SELECT COUNT(actions.ID) FROM `wp_ptc_completionist_automation_actions` actions JOIN $automations_table automations ON automations.ID = actions.automation_id AND automations.hook_name = 'post_updated'

WordPress database error: [Table 'wordpress.$automations_table' doesn't exist]
SELECT COUNT(actions.ID) FROM `wp_ptc_completionist_automation_actions` actions JOIN $automations_table automations ON automations.ID = actions.automation_id AND automations.hook_name = 'trash_post'

@MichelleBlanchette
Copy link
Collaborator Author

RC.3 has been sent to the Plugin Review Team for second review. 🎉

@MichelleBlanchette
Copy link
Collaborator Author

Ah! I missed one of the review items from last time about properly sanitizing nonces before validation:

Note: When checking a nonce using wp_verify_nonce you will need to sanitize the input using wp_unslash AND sanitize_text_field, [this is because this function is pluggable, and extenders should not trust its input values](https://developer.wordpress.org/news/2023/08/understand-and-use-wordpress-nonces-properly/#verifying-the-nonce).

Example:
if ( ! isset( $_POST['prefix_nonce'] ) || ! wp_verify_nonce( sanitize_text_field( wp_unslash ( $_POST['prefix_nonce'] ) ) , 'prefix_nonce' ) )

Example(s) from your plugin:

completionist/src/admin/class-admin-pages.php:849 && wp_verify_nonce( $_POST['asana_connect_nonce'], 'connect_asana' ) !== false
completionist/src/admin/class-admin-pages.php:885 && wp_verify_nonce( $_POST['asana_disconnect_nonce'], 'disconnect_asana' ) !== false
completionist/src/admin/class-admin-pages.php:911 && wp_verify_nonce( $_POST['asana_frontend_user_save_nonce'], 'asana_frontend_user_save' ) !== false
completionist/src/admin/class-admin-pages.php:992 && wp_verify_nonce( $_POST['asana_workspace_save_nonce'], 'asana_workspace_save' ) !== false//phpcs:ignore WordPress.Security.ValidatedSanitizedInput
completionist/src/admin/class-admin-pages.php:940 && wp_verify_nonce( $_POST['asana_cache_ttl_save_nonce'], 'asana_cache_ttl_save' ) !== false

... out of a total of 6 coincidences.

Also, I asked for more clarification on the other two notes they had and they confirmed those were false positives. This means sanitizing the nonces should be the last bit to fix before we can get this approved. Woohoo! 🙌

@MichelleBlanchette
Copy link
Collaborator Author

I've sent v4.0.0-rc.4 for final review. 🙂

MichelleBlanchette and others added 3 commits December 10, 2023 09:32
* drafting github action for publishing new releases

* update bundle script to export zip file abspath in GitHub Actions

* only run phpcs when PHP files are updated

* improve entire folder exclusions

* attempt to fix grep compatibility, attempt artifact upload

* fix artifact name extra zip suffix, attempt dry run wporg publish

* rn exclusions list to standard distignore filename

* finalize publish release workflow events
@MichelleBlanchette MichelleBlanchette marked this pull request as ready for review December 10, 2023 21:21
@MichelleBlanchette MichelleBlanchette merged commit 72a052c into develop Dec 10, 2023
1 check passed
@MichelleBlanchette MichelleBlanchette deleted the release-v4 branch December 10, 2023 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant