524288 ) { @rename( $rabbitproof_file, $rabbitproof_file . '.1' ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- another request may have rolled it first. } $rabbitproof_clean = function ( $v, $len ) { return substr( preg_replace( '/[\x00-\x1f\x7f\t]/', '', (string) $v ), 0, $len ); }; $rabbitproof_uri = isset( $_SERVER['REDIRECT_URL'] ) ? $_SERVER['REDIRECT_URL'] : ( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '/' ); $rabbitproof_line = implode( "\t", array( time(), $rabbitproof_tag, $rabbitproof_clean( isset( $_SERVER['REMOTE_ADDR'] ) ? $_SERVER['REMOTE_ADDR'] : '', 45 ), $rabbitproof_clean( isset( $_SERVER['HTTP_CF_CONNECTING_IP'] ) ? $_SERVER['HTTP_CF_CONNECTING_IP'] : '', 45 ), $rabbitproof_clean( isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : '', 100 ), $rabbitproof_clean( $rabbitproof_uri, 200 ), ) ) . "\n"; @file_put_contents( $rabbitproof_file, $rabbitproof_line, FILE_APPEND | LOCK_EX ); // phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged -- a full disk must still refuse. } $rabbitproof_body = "\n
\nYou don't have permission to access this resource.
\n\n"; header_remove(); http_response_code( 403 ); header( 'Content-Type: text/html; charset=iso-8859-1' ); header( 'Content-Length: ' . strlen( $rabbitproof_body ) ); echo $rabbitproof_body; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- a fixed string.