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

replace deprecated FILTER_SANITIZE_STRING (#126) #127

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

stklcode
Copy link
Contributor

@stklcode stklcode commented Oct 2, 2023

resolves #126

In the following method check_theme_file() URL sanitization is applied, so we can either use FILTER_SANITIZE_URL here as well or simply pass UNSAFE_RAW in this case.

public static function check_theme_file( $file ) {
// Simple file path check.
if ( filter_var( $file, FILTER_SANITIZE_URL ) !== $file ) {
return false;
}

@stklcode stklcode added the bug label Oct 2, 2023
@stklcode stklcode self-assigned this Oct 2, 2023
stklcode added a commit that referenced this pull request Oct 2, 2023
In the following method check_theme_file() URL sanitization is applied,
so we can either use FILTER_SANITIZE_URL here as well or simply pass
UNSAFE_RAW in this case.
In the following method check_theme_file() URL sanitization is applied,
so we can either use FILTER_SANITIZE_URL here as well or simply pass
UNSAFE_RAW in this case.
stklcode added a commit that referenced this pull request Oct 2, 2023
In the following method check_theme_file() URL sanitization is applied,
so we can either use FILTER_SANITIZE_URL here as well or simply pass
UNSAFE_RAW in this case.
@sonarcloud
Copy link

sonarcloud bot commented Oct 2, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@Zodiac1978 Zodiac1978 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!
LGTM.

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (7fd71df) 36.30% compared to head (5a7e857) 36.30%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #127   +/-   ##
==========================================
  Coverage      36.30%   36.30%           
  Complexity       147      147           
==========================================
  Files              5        5           
  Lines            774      774           
==========================================
  Hits             281      281           
  Misses           493      493           
Files Coverage Δ
inc/class-antivirus.php 17.74% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stklcode stklcode merged commit 5a7e857 into develop Oct 31, 2023
5 checks passed
@stklcode stklcode deleted the fix/126-deprecated-filter branch October 31, 2023 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FILTER_SANITIZE_STRING is deprecated in PHP 8.1
3 participants