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

(security) Dream come true #1

Open
szepeviktor opened this issue Jul 7, 2022 · 0 comments
Open

(security) Dream come true #1

szepeviktor opened this issue Jul 7, 2022 · 0 comments

Comments

@szepeviktor
Copy link

szepeviktor commented Jul 7, 2022

raw-core/inc/general.php

Lines 57 to 73 in 1b2bd16

/**
* Block potential harmful requests
*/
global $user_ID; if($user_ID) {
if(!current_user_can('administrator')) {
if (strlen($_SERVER['REQUEST_URI']) > 255 ||
stripos($_SERVER['REQUEST_URI'], "eval(") ||
stripos($_SERVER['REQUEST_URI'], "CONCAT") ||
stripos($_SERVER['REQUEST_URI'], "UNION+SELECT") ||
stripos($_SERVER['REQUEST_URI'], "base64")) {
@header("HTTP/1.1 414 Request-URI Too Long");
@header("Status: 414 Request-URI Too Long");
@header("Connection: Close");
@exit;
}
}
}

These line are the seed of

  1. https://github.com/szepeviktor/waf4wordpress/tree/master/http-analyzer
  2. and https://github.com/szepeviktor/waf4wordpress/tree/master/core-events

Update as I work.

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

No branches or pull requests

1 participant