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

Update Code Obfuscation Check to display multiple errors #366

Closed
wants to merge 3 commits into from

Conversation

ernilambar
Copy link
Member

Fixes #363

  • Added new static methods in Abstract_File_Check
    • files_preg_match() - Returns multiple files unlike file_preg_match()
    • Similarly files_str_contains
  • Updated methods in Code_Obfuscation_Check to handle array of files instead of a single file
  • files_preg_match() returns array of file and match. This data could be useful in the future enhancements.
    Eg:
Screen Shot 2023-12-29 at 1 41 55 PM

CLI output:

Screen Shot 2023-12-29 at 1 32 26 PM

@ernilambar ernilambar force-pushed the 363-fix-obfuscation branch 4 times, most recently from fb65781 to 7373989 Compare December 29, 2023 09:39
@davidperezgar davidperezgar added the [Team] Plugin Review Issues owned by Plugin Review Team label Jun 22, 2024
@ernilambar ernilambar force-pushed the 363-fix-obfuscation branch from 7373989 to bd5b13c Compare July 2, 2024 04:48
@swissspidy swissspidy added the [Type] Enhancement A suggestion for improvement of an existing feature label Jul 11, 2024
@swissspidy swissspidy added this to the 1.1.0 milestone Jul 11, 2024
Copy link

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ernilambar <[email protected]>
Co-authored-by: swissspidy <[email protected]>

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

@ernilambar
Copy link
Member Author

May be this PR should be rewritten following the approach used in Detect localhost/127.0.0.1 code in multiple files

@ernilambar
Copy link
Member Author

Closing in favor of #532

@ernilambar ernilambar closed this Jul 17, 2024
@ernilambar ernilambar deleted the 363-fix-obfuscation branch August 15, 2024 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Team] Plugin Review Issues owned by Plugin Review Team [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Obfuscation Check does not show multiple obfuscated files
3 participants