Skip to content

Commit

Permalink
fix(core): regex bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Mar 28, 2024
1 parent 3f92cc1 commit 3c86d83
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op]|lock)|~)$ {
access_log off; log_not_found off;
}

location ~* \.(pl|cgi|py|sh|lua)\$ {
location ~* \.(pl|cgi|py|sh|lua)$ {
return 444;
}

location ~* (w00tw00t) {
return 444;
}

location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)\$|^(\..*|Entries.*|Repository|Root|Tag|Template)\$|\.php_ {
location ~* \.(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(\.php)?|xtmpl)$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|\.php_ {
return 444;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ location ~* wp-includes/js/tinymce/langs/.*.php {
deny all;
}

location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php\$ {
location ~* /(?:uploads|files|wp-content|wp-includes)/.*\.php$ {
deny all;
}

location ~* /wp-content/uploads/nginx-helper/ {
internal;
}

location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|bzip2|7z)\$ {
location ~* ^/(wp-content)/(.*?)\.(zip|gz|tar|bzip2|7z)$ {
deny all;
}

Expand Down

0 comments on commit 3c86d83

Please sign in to comment.