[MIRROR] Add the known alts panel, which prevents suspicious login logs for whitelisted ckeys [MDB IGNORE] (#9306)

* Add the known alts panel, which prevents suspicious login logs for whitelisted ckeys

* fixed

* ops, missed one conflict

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
Co-authored-by: Useroth <37159550+Useroth@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-08 22:26:02 -05:00
committed by GitHub
co-authored by Mothblocks Useroth
parent 40c06849dd
commit 8978adde4a
10 changed files with 260 additions and 5 deletions
+19 -4
View File
@@ -1,13 +1,27 @@
Any time you make a change to the schema files, remember to increment the database schema version. Generally increment the minor number, major should be reserved for significant changes to the schema. Both values go up to 255.
The latest database version is 5.19 (5.17 for /tg/); The query to update the schema revision table is:
The latest database version is 5.20 (5.18 for /tg/); The query to update the schema revision table is:
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 19);
INSERT INTO `schema_revision` (`major`, `minor`) VALUES (5, 20);
or
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 19);
INSERT INTO `SS13_schema_revision` (`major`, `minor`) VALUES (5, 20);
In any query remember to add a prefix to the table names if you use one.
-----------------------------------------------------
Version 5.20, 1 November 2021, by Mothblocks
Added `known_alts` table for tracking who not to create suspicious logins for.
```
CREATE TABLE `known_alts` (
`id` INT NOT NULL AUTO_INCREMENT,
`ckey1` VARCHAR(32) NOT NULL,
`ckey2` VARCHAR(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `unique_contraints` (`ckey1` , `ckey2`)
);
```
-----------------------------------------------------
Version 5.19, 23 August 2021, by GoldenAlpharex
Added `discord_report` column to the `ban table`
@@ -15,8 +29,9 @@ Added `discord_report` column to the `ban table`
```
`discord_reported` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', /* SKYRAT EDIT - Labelling bans for ease of reporting them over Discord. */
```
-----------------------------------------------------
Version 5.17, 8 October 2021, by MrStonedOne + Mothblocks
Version 5.18, 8 October 2021, by MrStonedOne + Mothblocks
Changes any table that requrired a NOT NULL round ID to now accept NULL. In the BSQL past, these were handled as 0, but in the move to rust-g this behavior was lost.
```
+12
View File
@@ -686,6 +686,18 @@ CREATE TABLE `admin_connections` (
UNIQUE INDEX `unique_constraints` (`ckey`, `ip`, `cid`)
) ENGINE=InnoDB;
--
-- Table structure for table `known_alts`
--
DROP TABLE IF EXISTS `known_alts`;
CREATE TABLE `known_alts` (
`id` INT NOT NULL AUTO_INCREMENT,
`ckey1` VARCHAR(32) NOT NULL,
`ckey2` VARCHAR(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `unique_contraints` (`ckey1` , `ckey2`)
);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+12
View File
@@ -670,6 +670,18 @@ CREATE TABLE `SS13_admin_connections` (
UNIQUE INDEX `unique_constraints` (`ckey`, `ip`, `cid`)
) ENGINE=InnoDB;
--
-- Table structure for table `known_alts`
--
DROP TABLE IF EXISTS `SS13_known_alts`;
CREATE TABLE `SS13_known_alts` (
`id` INT NOT NULL AUTO_INCREMENT,
`ckey1` VARCHAR(32) NOT NULL,
`ckey2` VARCHAR(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `unique_contraints` (`ckey1` , `ckey2`)
);
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;