wordpress-develop icon indicating copy to clipboard operation
wordpress-develop copied to clipboard

57304: Mark credentials with `SensitiveParameter` attribute

Open petitphp opened this issue 2 years ago • 1 comments

Mark credentials with the new SensitiveParameter attribute available in PHP 8.2 to hide them in stack traces or log.

Trac ticket: https://core.trac.wordpress.org/ticket/57304


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

petitphp avatar Feb 28 '23 21:02 petitphp

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props petitphp, johnbillion.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

github-actions[bot] avatar Sep 24 '24 16:09 github-actions[bot]

@jrfnl If you'd like to give this the nod then I'll get it in.

johnbillion avatar Sep 24 '24 16:09 johnbillion

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance, it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

github-actions[bot] avatar Sep 24 '24 16:09 github-actions[bot]

Ah we still need to verify that WP Parser handles this change ok so the developer.wordpress.org site can still be generated correctly. I'll test it.

johnbillion avatar Sep 24 '24 16:09 johnbillion

Okay I finally got WP-Parser running locally on a PHP 7.4 container, at least enough to get it to parse the source and populate the parsed data. It looks to be working as expected and parsing each of the function parameters. The data displayed on the page comes from the @param tags anyway. This is good to go.

johnbillion avatar Feb 03 '25 19:02 johnbillion

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 59754 GitHub commit: https://github.com/WordPress/wordpress-develop/commit/85d00ec54c3a552ca28a996f6e1209e45821358a

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

github-actions[bot] avatar Feb 03 '25 19:02 github-actions[bot]