Skip to content

Commit

Permalink
FILTER_SANITIZE_STRING PHP 8.1 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi-Artturi Mäkelä committed Jan 19, 2023
1 parent a5fd066 commit e84ad0f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dustpress.php
Original file line number Diff line number Diff line change
Expand Up @@ -1941,8 +1941,8 @@ private function parse_request_data() {
elseif ( isset( $_REQUEST['dustpress_data'] ) ) {
$args = [
'bypassMainQuery' => FILTER_VALIDATE_BOOLEAN,
'partial' => FILTER_SANITIZE_STRING,
'path' => FILTER_SANITIZE_STRING,
'partial' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
'path' => FILTER_SANITIZE_FULL_SPECIAL_CHARS,
'render' => FILTER_VALIDATE_BOOLEAN,
'tidy' => FILTER_VALIDATE_BOOLEAN,
'data' => FILTER_VALIDATE_BOOLEAN,
Expand Down
4 changes: 3 additions & 1 deletion helpers/pagination.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ public function output() {
* @return string
*/
public function build_page_link() {
$query_string = filter_var( $_SERVER['QUERY_STRING'], FILTER_SANITIZE_STRING );

$query_string = htmlspecialchars( $_SERVER['QUERY_STRING'] );

$page_link = '?';
// User passed get parameters
if ( $query_string ) {
Expand Down

0 comments on commit e84ad0f

Please sign in to comment.