diff --git a/database/cs/01-init.sql b/database/cs/01-init.sql index 13c52a9..d6a9a6c 100644 --- a/database/cs/01-init.sql +++ b/database/cs/01-init.sql @@ -1,8 +1,8 @@ -- Setup databases and users CREATE DATABASE IF NOT EXISTS `pwnedhub`; CREATE DATABASE IF NOT EXISTS `pwnedhub-test`; -CREATE DATABASE IF NOT EXISTS `pwnedhub-config`; +CREATE DATABASE IF NOT EXISTS `pwnedhub-admin`; CREATE USER 'pwnedhub'@'%' IDENTIFIED BY 'dbconnectpass'; GRANT ALL PRIVILEGES ON `pwnedhub` . * TO 'pwnedhub'@'%'; GRANT ALL PRIVILEGES ON `pwnedhub-test` . * TO 'pwnedhub'@'%'; -GRANT ALL PRIVILEGES ON `pwnedhub-config` . * TO 'pwnedhub'@'%'; +GRANT ALL PRIVILEGES ON `pwnedhub-admin` . * TO 'pwnedhub'@'%'; diff --git a/database/cs/04-pwnedhub-config.sql b/database/cs/04-pwnedhub-admin.sql similarity index 97% rename from database/cs/04-pwnedhub-config.sql rename to database/cs/04-pwnedhub-admin.sql index 2e3d2ef..aab5905 100644 --- a/database/cs/04-pwnedhub-config.sql +++ b/database/cs/04-pwnedhub-admin.sql @@ -1,9 +1,9 @@ -- Attach to database -USE `pwnedhub-config`; +USE `pwnedhub-admin`; -- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64) -- --- Host: localhost Database: pwnedhub-config +-- Host: localhost Database: pwnedhub-admin -- ------------------------------------------------------ -- Server version 8.0.33 diff --git a/database/ctf/01-init.sql b/database/ctf/01-init.sql index 13c52a9..d6a9a6c 100644 --- a/database/ctf/01-init.sql +++ b/database/ctf/01-init.sql @@ -1,8 +1,8 @@ -- Setup databases and users CREATE DATABASE IF NOT EXISTS `pwnedhub`; CREATE DATABASE IF NOT EXISTS `pwnedhub-test`; -CREATE DATABASE IF NOT EXISTS `pwnedhub-config`; +CREATE DATABASE IF NOT EXISTS `pwnedhub-admin`; CREATE USER 'pwnedhub'@'%' IDENTIFIED BY 'dbconnectpass'; GRANT ALL PRIVILEGES ON `pwnedhub` . * TO 'pwnedhub'@'%'; GRANT ALL PRIVILEGES ON `pwnedhub-test` . * TO 'pwnedhub'@'%'; -GRANT ALL PRIVILEGES ON `pwnedhub-config` . * TO 'pwnedhub'@'%'; +GRANT ALL PRIVILEGES ON `pwnedhub-admin` . * TO 'pwnedhub'@'%'; diff --git a/database/ctf/04-pwnedhub-config.sql b/database/ctf/04-pwnedhub-admin.sql similarity index 97% rename from database/ctf/04-pwnedhub-config.sql rename to database/ctf/04-pwnedhub-admin.sql index 508d910..ea5149e 100644 --- a/database/ctf/04-pwnedhub-config.sql +++ b/database/ctf/04-pwnedhub-admin.sql @@ -1,9 +1,9 @@ -- Attach to database -USE `pwnedhub-config`; +USE `pwnedhub-admin`; -- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64) -- --- Host: localhost Database: pwnedhub-config +-- Host: localhost Database: pwnedhub-admin -- ------------------------------------------------------ -- Server version 8.0.33 diff --git a/database/init/01-init.sql b/database/init/01-init.sql index 13c52a9..d6a9a6c 100644 --- a/database/init/01-init.sql +++ b/database/init/01-init.sql @@ -1,8 +1,8 @@ -- Setup databases and users CREATE DATABASE IF NOT EXISTS `pwnedhub`; CREATE DATABASE IF NOT EXISTS `pwnedhub-test`; -CREATE DATABASE IF NOT EXISTS `pwnedhub-config`; +CREATE DATABASE IF NOT EXISTS `pwnedhub-admin`; CREATE USER 'pwnedhub'@'%' IDENTIFIED BY 'dbconnectpass'; GRANT ALL PRIVILEGES ON `pwnedhub` . * TO 'pwnedhub'@'%'; GRANT ALL PRIVILEGES ON `pwnedhub-test` . * TO 'pwnedhub'@'%'; -GRANT ALL PRIVILEGES ON `pwnedhub-config` . * TO 'pwnedhub'@'%'; +GRANT ALL PRIVILEGES ON `pwnedhub-admin` . * TO 'pwnedhub'@'%'; diff --git a/database/init/04-pwnedhub-config.sql b/database/init/04-pwnedhub-admin.sql similarity index 97% rename from database/init/04-pwnedhub-config.sql rename to database/init/04-pwnedhub-admin.sql index 2e3d2ef..aab5905 100644 --- a/database/init/04-pwnedhub-config.sql +++ b/database/init/04-pwnedhub-admin.sql @@ -1,9 +1,9 @@ -- Attach to database -USE `pwnedhub-config`; +USE `pwnedhub-admin`; -- MySQL dump 10.13 Distrib 8.0.33, for Linux (x86_64) -- --- Host: localhost Database: pwnedhub-config +-- Host: localhost Database: pwnedhub-admin -- ------------------------------------------------------ -- Server version 8.0.33 diff --git a/pwnedadmin/config.py b/pwnedadmin/config.py index c25ec6e..62ff904 100644 --- a/pwnedadmin/config.py +++ b/pwnedadmin/config.py @@ -11,7 +11,7 @@ class BaseConfig(object): # database DATABASE_HOST = os.environ.get('DATABASE_HOST', 'localhost') - SQLALCHEMY_DATABASE_URI = f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-config" + SQLALCHEMY_DATABASE_URI = f"mysql://pwnedhub:dbconnectpass@{DATABASE_HOST}/pwnedhub-admin" SQLALCHEMY_TRACK_MODIFICATIONS = False diff --git a/pwnedadmin/templates/config.html b/pwnedadmin/templates/config.html index aa94e22..ad6ccb6 100644 --- a/pwnedadmin/templates/config.html +++ b/pwnedadmin/templates/config.html @@ -1,7 +1,7 @@
-