diff --git a/README.md b/README.md index f85ccb0..68bd501 100644 --- a/README.md +++ b/README.md @@ -449,6 +449,11 @@ This will disable the maintenance mode. ### ChangeLog +#### v3.2.1 +* Bumped library versions, including security patches. +* Fixed a bug in the PostgreSQL handler. +* Some forgotten naming from Torrust-Axum to Torrust-Actix. + #### v3.2.0 * Bumped library versions. * Modified the way scheduling was done through threads, it could lock up and slow down public trackers with heavy activity. diff --git a/bin/pgsql_structure.sql b/bin/pgsql_structure.sql index c115e7d..ef828ad 100644 --- a/bin/pgsql_structure.sql +++ b/bin/pgsql_structure.sql @@ -54,14 +54,13 @@ ALTER TABLE IF EXISTS public.keys CREATE TABLE IF NOT EXISTS public.users ( uuid bytea NOT NULL, - `key` bytea NOT NULL, + keyhash bytea NOT NULL, uploaded bigint NOT NULL DEFAULT 0, downloaded bigint NOT NULL DEFAULT 0, completed bigint NOT NULL DEFAULT 0, updated bigint NOT NULL DEFAULT 0, active bigint NOT NULL DEFAULT 0, - CONSTRAINT users_puuid PRIMARY KEY (uuid), - CONSTRAINT users_pkey PRIMARY KEY (`key`) + CONSTRAINT users_puuid_keyhash PRIMARY KEY (uuid, keyhash) ) TABLESPACE pg_default; diff --git a/bin/torrust-actix_linux_x86_64 b/bin/torrust-actix_linux_x86_64 index 77d4a7d..e4766e4 100644 Binary files a/bin/torrust-actix_linux_x86_64 and b/bin/torrust-actix_linux_x86_64 differ diff --git a/bin/torrust-actix_windows_x86_64.exe b/bin/torrust-actix_windows_x86_64.exe index 1051506..e818f1e 100644 Binary files a/bin/torrust-actix_windows_x86_64.exe and b/bin/torrust-actix_windows_x86_64.exe differ diff --git a/docker/Dockerfile b/docker/Dockerfile index 199c378..f89a160 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM rust:alpine3.17 +FROM rust:alpine3.18 ARG FULL_CONFIG="" ENV FULL_CONFIG=$FULL_CONFIG @@ -97,7 +97,7 @@ ENV USERS=$USERS ARG DB_STRUCTURE_DB_USERS="users" ARG DB_STRUCTURE_TABLE_USERS_UUID="uuid" -ARG DB_STRUCTURE_TABLE_USERS_KEY="key" +ARG DB_STRUCTURE_TABLE_USERS_KEY="keyhash" ARG DB_STRUCTURE_TABLE_USERS_UPLOADED="uploaded" ARG DB_STRUCTURE_TABLE_USERS_DOWNLOADED="downloaded" ARG DB_STRUCTURE_TABLE_USERS_COMPLETED="completed" @@ -107,7 +107,7 @@ ENV DB_STRUCTURE_DB_USERS=$DB_STRUCTURE_DB_USERS DB_STRUCTURE_TABLE_USERS_UUID=$ RUN apk add git musl-dev RUN git clone https://github.com/Power2All/torrust-actix.git /root/torrust-actix -RUN cd /root/torrust-actix && git checkout tags/v3.2.0 +RUN cd /root/torrust-actix && git checkout tags/v3.2.1 WORKDIR /root/torrust-actix RUN cd /root/torrust-actix RUN cargo build --release && rm -Rf target/release/.fingerprint target/release/build target/release/deps target/release/examples target/release/incremental diff --git a/src/database/postgresql.rs b/src/database/postgresql.rs index 4f6a645..7ee138a 100644 --- a/src/database/postgresql.rs +++ b/src/database/postgresql.rs @@ -39,7 +39,7 @@ impl DatabaseConnectorPgSQL { let mut structure = DatabaseConnector { mysql: None, sqlite: None, pgsql: None, engine: None }; structure.pgsql = Some(DatabaseConnectorPgSQL { pool: pgsql_connect.unwrap() }); - structure.engine = Some(DatabaseDrivers::mysql); + structure.engine = Some(DatabaseDrivers::pgsql); structure } diff --git a/src/databases.rs b/src/databases.rs index c9dc286..0bd521a 100644 --- a/src/databases.rs +++ b/src/databases.rs @@ -70,7 +70,7 @@ impl DatabaseConnector { if self.engine.is_some() { return match self.engine.clone().unwrap() { DatabaseDrivers::sqlite3 => { self.sqlite.clone().unwrap().load_blacklist(tracker.clone()).await } - DatabaseDrivers::mysql => { self.mysql.clone().unwrap().load_blacklist(tracker.clone()).await} + DatabaseDrivers::mysql => { self.mysql.clone().unwrap().load_blacklist(tracker.clone()).await } DatabaseDrivers::pgsql => { self.pgsql.clone().unwrap().load_blacklist(tracker.clone()).await } }; }