{"id":175,"date":"2021-05-11T00:41:31","date_gmt":"2021-05-11T00:41:31","guid":{"rendered":"http:\/\/iplocationblock.test\/codex\/validation-logs\/"},"modified":"2021-05-11T11:55:32","modified_gmt":"2021-05-11T11:55:32","slug":"validation-logs","status":"publish","type":"codex","link":"https:\/\/iplocationblock.com\/codex\/validation-logs\/","title":{"rendered":"Validation logs"},"content":{"rendered":"<p>This plugin stores validation logs when <strong>Record \u201cLogs\u201d<\/strong> is enabled in  <a href=\"https:\/\/iplocationblock.com\/codex\/privacy-and-record-settings\/\" title=\"Privacy and record settings | IP Location Block\"><strong>Privacy and record settings<\/strong><\/a> section on <strong>Settings<\/strong> tab.<\/p>\n<p><!--more--><\/p>\n<h3 id=\"contents-in-log\">Contents in log<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/ValidationLogs-1.png\" alt=\"Validation logs\" title=\"Validation logs\" \/><\/p>\n<p>The followings are some of items that are stores in logs.<\/p>\n<h4 id=\"request\">Request<\/h4>\n<p>Following the HTTP method and the port, the requested path is recorded. <a href=\"https:\/\/tools.ietf.org\/html\/rfc2616#section-9\" title=\"Hypertext Transfer Protocol -- HTTP\/1.1: 9 Method Definitions\">RFC2616<\/a> (obsoleted by <a href=\"https:\/\/tools.ietf.org\/html\/rfc7231#section-4\" title=\"Hypertext Transfer Protocol (HTTP\/1.1): 4. Request Methods\">RFC7231<\/a>) defines 8  method, i.e. GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE, CONNECT. The  definitions says:<\/p>\n<blockquote>\n<p>In particular, the convention has been established that the GET and HEAD  methods SHOULD NOT have the significance of taking an action other than  retrieval. These methods ought to be considered \u201csafe\u201d. This allows user  agents to represent other methods, such as POST, PUT and DELETE, in a  special way, so that the user is made aware of the fact that a possibly  unsafe action is being requested.<\/p>\n<\/blockquote>\n<p>But in the real world, we can find a simple hyperlink (i.e. GET method) which  takes an action other than retrieval.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/MediaLibrary.png\" alt=\"Media Library\" title=\"Media Library\" \/><\/p>\n<p>Anyway, we\u2019d better take care about what\u2019s being done by a malicious request.<\/p>\n<h4 id=\"_post-data\">$_POST data<\/h4>\n<p>When a request submitted by POST method is blocked, keys in <code class=\"highlighter-rouge\">$_POST<\/code>  environment variable are recorded into the log. The corresponded keys in  \u201c<strong>$_POST keys to be recorded with their values in logs<\/strong>\u201d in <a href=\"https:\/\/iplocationblock.com\/codex\/privacy-and-record-settings\/\" title=\"Privacy and record settings | IP Location Block\"><strong>Privacy and  record settings<\/strong><\/a> section are deployed to their values in order to  take a look at them.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/RecordSettings.png\" alt=\"Record settings\" title=\"Record settings\" \/><\/p>\n<p>The recommended keys are as follows:<\/p>\n<ul>\n<li>\n<p><code class=\"highlighter-rouge\">action<\/code><br \/> This key is very popular in WordPress. It usually shows the process of doing  something.<\/p>\n<\/li>\n<li>\n<p><code class=\"highlighter-rouge\">comment<\/code><br \/> It shows the contents of comment posted to <code class=\"highlighter-rouge\">wp-comments-post.php<\/code>.<\/p>\n<\/li>\n<li>\n<p><code class=\"highlighter-rouge\">log<\/code>, <code class=\"highlighter-rouge\">pwd<\/code><br \/> The login name and password posted to <code class=\"highlighter-rouge\">wp-login.php<\/code>. The <code class=\"highlighter-rouge\">pwd<\/code> will be  masked with <code class=\"highlighter-rouge\">***<\/code> when it comes from a logged in user.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/LogLoginForm.png\" alt=\"Log of Login form\" title=\"Log of Login form\" \/><\/p>\n<\/li>\n<li>\n<p><code class=\"highlighter-rouge\">FILES<\/code><br \/> It shows the contents of HTTP File Upload variables <code class=\"highlighter-rouge\">$_FILES<\/code> if  <a href=\"https:\/\/php.net\/manual\/features.file-upload.post-method.php\" title=\"PHP: POST method uploads - Manual\">POST method uploads<\/a> was requested. (since 0.3.0.3)<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/LogUploadFile.png\" alt=\"Malicious file upload\" title=\"Malicious file upload\" \/><\/p>\n<\/li>\n<\/ul>\n<h4 id=\"result\">Result<\/h4>\n<p>The column \u201c<strong>Result<\/strong>\u201d shows the validation result as the following table  describes:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left\">Result<\/th>\n<th style=\"text-align: left\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left\">passed<\/td>\n<td style=\"text-align: left\">passed through the validation<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">passUA<\/td>\n<td style=\"text-align: left\">passed by menas of \u201cUA string and qualification\u201d<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">blocked<\/td>\n<td style=\"text-align: left\">blocked by country<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">blockUA<\/td>\n<td style=\"text-align: left\">blocked by menas of \u201cUA string and qualification\u201d<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">wp-zep<\/td>\n<td style=\"text-align: left\">blocked by WP-ZEP<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">multi<\/td>\n<td style=\"text-align: left\">blocked by XML-RPC multicall<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">badsig<\/td>\n<td style=\"text-align: left\">blocked by Bad signatures<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">badbot<\/td>\n<td style=\"text-align: left\">blocked by Badly-behaved bots and crawlers<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">extra<\/td>\n<td style=\"text-align: left\">blocked by Extra IP addresses<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">failed<\/td>\n<td style=\"text-align: left\">blocked by failed login attempt<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">limited<\/td>\n<td style=\"text-align: left\">blocked by excess of limit login attempt<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">upload<\/td>\n<td style=\"text-align: left\">blocked by forbidden MIME type<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left\">^<\/td>\n<td style=\"text-align: left\">found unexpected attached files<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"live-update\">Live update<\/h3>\n<p>Independent of <a href=\"https:\/\/iplocationblock.com\/codex\/privacy-and-record-settings\/\" title=\"Privacy and record settings | IP Location Block\"><strong>Privacy and record settings<\/strong><\/a> section, you can  see all the requests validated by this plugin in almost real time.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/iplocationblock.com\/wp-content\/uploads\/2021\/05\/LiveUpdate.png\" alt=\"Live update\" title=\"Live update\" \/><\/p>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","class_list":["post-175","codex","type-codex","status-publish","hentry","codex-category-dashboard"],"_links":{"self":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/codex\/175","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/codex"}],"about":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/types\/codex"}],"replies":[{"embeddable":true,"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/comments?post=175"}],"wp:attachment":[{"href":"https:\/\/iplocationblock.com\/wp-json\/wp\/v2\/media?parent=175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}