-
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #376 from zurdi15/master
v2.0.0
- Loading branch information
Showing
124 changed files
with
6,900 additions
and
1,757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Thanks for helping make RomM safer for everyone. | ||
|
||
## Reporting Security Issues | ||
|
||
If you believe you have found a security vulnerability in RomM, please report it to us through coordinated disclosure. | ||
|
||
**Do not report security vulnerabilities through public GitHub issues, discussions, pull requests, or on our public Discord server.** | ||
|
||
Instead, use the [vulnerability report form](https://github.com/zurdi15/romm/security/advisories/new) on GitHub. | ||
|
||
Please include as much of the information listed below as you can to help us better understand and resolve the issue: | ||
|
||
- The type of issue (e.g., permission bypass, remote code execution, etc.) | ||
- Full paths of source file(s) related to the manifestation of the issue | ||
- The location of the affected source code (tag/branch/commit or direct URL) | ||
- Any special configuration required to reproduce the issue | ||
- Step-by-step instructions to reproduce the issue | ||
- Proof-of-concept or exploit code (if possible) | ||
- Impact of the issue (including how an attacker might exploit the issue) | ||
|
||
This information will help us investigate and patch the issue more quickly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
"""update to 2.0.0 | ||
Revision ID: 2.0.0 | ||
Revises: 1.8.3 | ||
Create Date: 2023-08-10 22:18:24.012779 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "2.0.0" | ||
down_revision = "1.8.3" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_table( | ||
"users", | ||
sa.Column("id", sa.Integer(), autoincrement=True, nullable=False), | ||
sa.Column("username", sa.String(length=255), nullable=True), | ||
sa.Column("hashed_password", sa.String(length=255), nullable=True), | ||
sa.Column("enabled", sa.Boolean(), nullable=True), | ||
sa.Column( | ||
"role", sa.Enum("VIEWER", "EDITOR", "ADMIN", name="role"), nullable=True | ||
), | ||
sa.Column("avatar_path", sa.String(length=255), nullable=True), | ||
sa.PrimaryKeyConstraint("id"), | ||
) | ||
with op.batch_alter_table("users", schema=None) as batch_op: | ||
batch_op.create_index( | ||
batch_op.f("ix_users_username"), ["username"], unique=True | ||
) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table("users", schema=None) as batch_op: | ||
batch_op.drop_index(batch_op.f("ix_users_username")) | ||
|
||
op.drop_table("users") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,67 @@ | ||
import os | ||
import secrets | ||
from dotenv import load_dotenv | ||
from typing import Final | ||
|
||
load_dotenv() | ||
|
||
# Uvicorn | ||
DEV_PORT: int = int(os.environ.get("VITE_BACKEND_DEV_PORT", "5000")) | ||
DEV_HOST: str = "0.0.0.0" | ||
# UVICORN | ||
DEV_PORT: Final = int(os.environ.get("VITE_BACKEND_DEV_PORT", "5000")) | ||
DEV_HOST: Final = "0.0.0.0" | ||
|
||
# PATHS | ||
ROMM_BASE_PATH: str = os.environ.get("ROMM_BASE_PATH", "/romm") | ||
LIBRARY_BASE_PATH: str = f"{ROMM_BASE_PATH}/library" | ||
FRONT_LIBRARY_PATH: str = "/assets/romm/library" | ||
ROMM_USER_CONFIG_PATH: str = f"{ROMM_BASE_PATH}/config.yml" | ||
SQLITE_DB_BASE_PATH: str = f"{ROMM_BASE_PATH}/database" | ||
RESOURCES_BASE_PATH: str = f"{ROMM_BASE_PATH}/resources" | ||
LOGS_BASE_PATH: str = f"{ROMM_BASE_PATH}/logs" | ||
HIGH_PRIO_STRUCTURE_PATH: str = f"{LIBRARY_BASE_PATH}/roms" | ||
ROMM_BASE_PATH: Final = os.environ.get("ROMM_BASE_PATH", "/romm") | ||
ROMS_FOLDER_NAME: Final = os.environ.get("ROMS_FOLDER_NAME", "roms") | ||
LIBRARY_BASE_PATH: Final = f"{ROMM_BASE_PATH}/library" | ||
FRONT_LIBRARY_PATH: Final = "/assets/romm/library" | ||
ROMM_USER_CONFIG_PATH: Final = f"{ROMM_BASE_PATH}/config.yml" | ||
SQLITE_DB_BASE_PATH: Final = f"{ROMM_BASE_PATH}/database" | ||
RESOURCES_BASE_PATH: Final = f"{ROMM_BASE_PATH}/resources" | ||
LOGS_BASE_PATH: Final = f"{ROMM_BASE_PATH}/logs" | ||
HIGH_PRIO_STRUCTURE_PATH: Final = f"{LIBRARY_BASE_PATH}/{ROMS_FOLDER_NAME}" | ||
|
||
# DEFAULT RESOURCES | ||
DEFAULT_URL_COVER_L: str = ( | ||
DEFAULT_URL_COVER_L: Final = ( | ||
"https://images.igdb.com/igdb/image/upload/t_cover_big/nocover.png" | ||
) | ||
DEFAULT_PATH_COVER_L: str = "default/default/cover/big.png" | ||
DEFAULT_URL_COVER_S: str = ( | ||
DEFAULT_PATH_COVER_L: Final = "default/default/cover/big.png" | ||
DEFAULT_URL_COVER_S: Final = ( | ||
"https://images.igdb.com/igdb/image/upload/t_cover_small/nocover.png" | ||
) | ||
DEFAULT_PATH_COVER_S: str = "default/default/cover/small.png" | ||
DEFAULT_PATH_COVER_S: Final = "default/default/cover/small.png" | ||
|
||
# MARIADB | ||
DB_HOST = os.environ.get("DB_HOST", "127.0.0.1") | ||
DB_PORT: int = int(os.environ.get("DB_PORT", 3306)) | ||
DB_USER = os.environ.get("DB_USER") | ||
DB_PASSWD = os.environ.get("DB_PASSWD") | ||
DB_NAME = os.environ.get("DB_NAME", "romm") | ||
DB_HOST: Final = os.environ.get("DB_HOST", "127.0.0.1") | ||
DB_PORT: Final = int(os.environ.get("DB_PORT", 3306)) | ||
DB_USER: Final = os.environ.get("DB_USER") | ||
DB_PASSWD: Final = os.environ.get("DB_PASSWD") | ||
DB_NAME: Final = os.environ.get("DB_NAME", "romm") | ||
|
||
# REDIS | ||
REDIS_HOST = os.environ.get('REDIS_HOST', 'localhost') | ||
REDIS_PORT = os.environ.get('REDIS_PORT', '6379') | ||
ENABLE_EXPERIMENTAL_REDIS: Final = ( | ||
os.environ.get("ENABLE_EXPERIMENTAL_REDIS", "false") == "true" | ||
) | ||
REDIS_HOST: Final = os.environ.get("REDIS_HOST", "localhost") | ||
REDIS_PORT: Final = os.environ.get("REDIS_PORT", "6379") | ||
|
||
# IGDB | ||
CLIENT_ID = os.environ.get("CLIENT_ID", "") | ||
CLIENT_SECRET = os.environ.get("CLIENT_SECRET", "") | ||
IGDB_CLIENT_ID: Final = os.environ.get( | ||
"IGDB_CLIENT_ID", os.environ.get("CLIENT_ID", "") | ||
) | ||
IGDB_CLIENT_SECRET: Final = os.environ.get( | ||
"IGDB_CLIENT_SECRET", os.environ.get("CLIENT_SECRET", "") | ||
) | ||
|
||
# STEAMGRIDDB | ||
STEAMGRIDDB_API_KEY = os.environ.get("STEAMGRIDDB_API_KEY", "") | ||
STEAMGRIDDB_API_KEY: Final = os.environ.get("STEAMGRIDDB_API_KEY", "") | ||
|
||
# DB DRIVERS | ||
ROMM_DB_DRIVER = os.environ.get("ROMM_DB_DRIVER", "sqlite") | ||
ROMM_DB_DRIVER: Final = os.environ.get("ROMM_DB_DRIVER", "sqlite") | ||
|
||
# AUTH | ||
ROMM_AUTH_ENABLED: Final = os.environ.get("ROMM_AUTH_ENABLED", "false") == "true" | ||
ROMM_AUTH_USERNAME: Final = os.environ.get("ROMM_AUTH_USERNAME", "admin") | ||
ROMM_AUTH_PASSWORD: Final = os.environ.get("ROMM_AUTH_PASSWORD", "admin") | ||
ROMM_AUTH_SECRET_KEY: Final = os.environ.get( | ||
"ROMM_AUTH_SECRET_KEY", secrets.token_hex(32) | ||
) |
Oops, something went wrong.