From: Roland Häder Date: Wed, 28 Oct 2020 10:17:28 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=259f6140d134236c9b9f3407b9158f40e1c3f439;p=ctracker.git Continued: - more UTF-8 - added check_ua Signed-off-by: Roland Häder --- diff --git a/libs/lib_updates.php b/libs/lib_updates.php index 34036de..d32e82a 100644 --- a/libs/lib_updates.php +++ b/libs/lib_updates.php @@ -107,13 +107,34 @@ FOREIGN KEY ( `ctracker_data_id` ) REFERENCES `' . $GLOBALS['ctracker_dbname'] . // UTF-8 [ - "ALTER TABLE `ctracker_ticket`CHANGE `ctracker_ticket_remote_addr` `ctracker_ticket_remote_addr` varchar(15) COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket`", - "ALTER TABLE `ctracker_ticket`CHANGE `ctracker_ticket_proxy_addr` `ctracker_ticket_proxy_addr` varchar(15) COLLATE 'utf8_general_ci' NULL AFTER `ctracker_ticket_remote_addr`", - "ALTER TABLE `ctracker_ticket`CHANGE `ctracker_ticket_user_agent` `ctracker_ticket_user_agent` tinytext COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_proxy_addr`", - "ALTER TABLE `ctracker_ticket`CHANGE `ctracker_ticket_name` `ctracker_ticket_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_user_agent`", - "ALTER TABLE `ctracker_ticket`CHANGE `ctracker_ticket_email` `ctracker_ticket_email` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_name`", - "ALTER TABLE `ctracker_ticket`CHANGE `ctracker_ticket_comment` `ctracker_ticket_comment` tinytext COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_email`", - "ALTER TABLE `ctracker_ticket`COLLATE 'utf8_general_ci'", + "ALTER TABLE `ctracker_ticket` CHANGE `ctracker_ticket_remote_addr` `ctracker_ticket_remote_addr` varchar(15) COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket`", + "ALTER TABLE `ctracker_ticket` CHANGE `ctracker_ticket_proxy_addr` `ctracker_ticket_proxy_addr` varchar(15) COLLATE 'utf8_general_ci' NULL AFTER `ctracker_ticket_remote_addr`", + "ALTER TABLE `ctracker_ticket` CHANGE `ctracker_ticket_user_agent` `ctracker_ticket_user_agent` tinytext COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_proxy_addr`", + "ALTER TABLE `ctracker_ticket` CHANGE `ctracker_ticket_name` `ctracker_ticket_name` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_user_agent`", + "ALTER TABLE `ctracker_ticket` CHANGE `ctracker_ticket_email` `ctracker_ticket_email` varchar(255) COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_name`", + "ALTER TABLE `ctracker_ticket` CHANGE `ctracker_ticket_comment` `ctracker_ticket_comment` tinytext COLLATE 'utf8_general_ci' NOT NULL AFTER `ctracker_ticket_email`", + "ALTER TABLE `ctracker_ticket` COLLATE 'utf8_general_ci'", + ], + + // More UTF-8 + [ + "ALTER TABLE `ctracker_data` CHANGE `remote_addr` `remote_addr` varchar(15) COLLATE 'utf8_general_ci' NOT NULL COMMENT 'Remote address' AFTER `id`", + "ALTER TABLE `ctracker_data` CHANGE `user_agent` `user_agent` tinytext COLLATE 'utf8_general_ci' NOT NULL COMMENT 'User agent string' AFTER `remote_addr`", + "ALTER TABLE `ctracker_data` CHANGE `get_data` `get_data` tinytext COLLATE 'utf8_general_ci' NOT NULL COMMENT 'Serialized GET data' AFTER `user_agent`", + "ALTER TABLE `ctracker_data` CHANGE `post_data` `post_data` tinytext COLLATE 'utf8_general_ci' NOT NULL COMMENT 'Serialized POST data' AFTER `get_data`", + "ALTER TABLE `ctracker_data` CHANGE `check_worm` `check_worm` tinytext COLLATE 'utf8_general_ci' NOT NULL COMMENT 'Manipulated GET data' AFTER `check_ua`", + "ALTER TABLE `ctracker_data` CHANGE `check_post` `check_post` tinytext COLLATE 'utf8_general_ci' NOT NULL COMMENT 'Manipulated GET data' AFTER `check_worm`", + "ALTER TABLE `ctracker_data` CHANGE `referer` `referer` varchar(255) COLLATE 'utf8_general_ci' NOT NULL COMMENT 'Referer' AFTER `script_name`", + "ALTER TABLE `ctracker_data` CHANGE `request_method` `request_method` varchar(255) COLLATE 'utf8_general_ci' NULL COMMENT 'HTTP request method' AFTER `referer`", + "ALTER TABLE `ctracker_data` CHANGE `proxy_used` `proxy_used` enum('Y','N') COLLATE 'utf8_general_ci' NOT NULL DEFAULT 'N' COMMENT 'Proxy used?' AFTER `request_method`", + "ALTER TABLE `ctracker_data` CHANGE `last_attempt` `last_attempt` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE CURRENT_TIMESTAMP COMMENT 'Last attempt' AFTER `first_attempt`", + "ALTER TABLE `ctracker_data` CHANGE `proxy_addr` `proxy_addr` varchar(15) COLLATE 'utf8_general_ci' NULL COMMENT 'Detected proxy address' AFTER `count`", + "ALTER TABLE `ctracker_data` COLLATE 'utf8_general_ci'", + ], + + // check_ua + [ + "ALTER TABLE `ctracker_data` ADD `check_ua` tinytext COLLATE 'utf8_general_ci' NOT NULL AFTER `post_data`", ], ]; }