feat(rgpd): legales, cookies, baja de marketing, marcado AI Act y alertas sin PII
Claude-Session: https://claude.ai/code/session_01UNZxBnD6dnMGEdbvBVwoS7
This commit is contained in:
parent
ff2ad3d1b4
commit
96f0139861
42 changed files with 1739 additions and 162 deletions
52
.env.example
52
.env.example
|
|
@ -70,3 +70,55 @@ GEMINI_IMAGE_MODEL=gemini-3.1-flash-image
|
|||
# DataImpulse is removed from every chain until midnight and the jobs that
|
||||
# needed it fail with a clear error. 0 disables the cap. Default 500.
|
||||
# PAID_PROXY_DAILY_MB=500
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Privacy, retention and access control (GDPR remediation, 4-sep-2026)
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Absolute base URL of the API as the internet reaches it. Already used for the
|
||||
# absolute clip URLs in webhook payloads; now also required to build the
|
||||
# unsubscribe link that goes in the out-of-minutes email. Without it that email
|
||||
# falls back to "reply to unsubscribe".
|
||||
# PUBLIC_API_URL=https://api.openshorts.app
|
||||
|
||||
# /videos and /thumbnails are authenticated endpoints, not static mounts.
|
||||
# MEDIA_TOKEN_TTL_SECONDS: life of the per-user token the dashboard appends to
|
||||
# <video src> / <img src> URLs (default 43200 = 12 h).
|
||||
# MEDIA_URL_TTL_SECONDS: life of the path-signed capability handed to consumers
|
||||
# that cannot send a header — webhook payloads and MCP tool results
|
||||
# (default 86400 = 24 h).
|
||||
# MEDIA_TOKEN_TTL_SECONDS=43200
|
||||
# MEDIA_URL_TTL_SECONDS=86400
|
||||
|
||||
# Retention for the two kinds of file that had none. Thumbnails and the frames
|
||||
# sampled to make them are close-ups of a real person; the clock runs from the
|
||||
# last download. Uploaded actor photos die with the job that used them.
|
||||
# THUMBNAIL_RETENTION_SECONDS=86400
|
||||
# ACTOR_UPLOAD_RETENTION_SECONDS=3600
|
||||
|
||||
# Per-IP rate limiting (rate_limit.py). "<max requests>/<window seconds>".
|
||||
# Defaults: auth 30/600, process 60/3600, mcp 240/60. Set RATE_LIMIT_ENABLED=0
|
||||
# to turn the whole thing off (self-host behind your own firewall).
|
||||
# RATE_LIMIT_ENABLED=1
|
||||
# RATE_LIMIT_AUTH=30/600
|
||||
# RATE_LIMIT_PROCESS=60/3600
|
||||
# RATE_LIMIT_MCP=240/60
|
||||
|
||||
# Which hop may declare the client's address in X-Forwarded-For. The Dockerfile
|
||||
# defaults to the private Docker ranges; narrow it to Traefik's own address on
|
||||
# the container network in production. NEVER "*": that lets any caller forge
|
||||
# the IP the rate limiter and the rights declaration are keyed on.
|
||||
# FORWARDED_ALLOW_IPS=10.0.1.7
|
||||
|
||||
# Strict-Transport-Security value sent on https responses from the API. Empty
|
||||
# disables it. Do not add "preload" without understanding that it is one-way.
|
||||
# HSTS_HEADER=max-age=31536000; includeSubDomains
|
||||
|
||||
# Encrypted PostgreSQL backups (ops/pg_backup.sh — installed and scheduled on
|
||||
# the database host, not by the app). The privacy policy promises a deletion is
|
||||
# gone from every copy within 30 days, which is only true while this runs.
|
||||
# DATABASE_URL=postgres://user:pass@host:5432/openshorts
|
||||
# BACKUP_AGE_RECIPIENT=age1...
|
||||
# BACKUP_DEST=s3://openshorts-backups/pg
|
||||
# BACKUP_S3_ENDPOINT=https://<accountid>.r2.cloudflarestorage.com
|
||||
# RETENTION_DAYS=30
|
||||
|
|
|
|||
|
|
@ -26,7 +26,8 @@ def setup_sync(app):
|
|||
from starlette.middleware.sessions import SessionMiddleware
|
||||
app.add_middleware(SessionMiddleware, secret_key=settings.jwt_secret)
|
||||
|
||||
from . import auth, oauth, billing, social_profiles, videos, api_keys, account, mcp_oauth
|
||||
from . import (auth, oauth, billing, social_profiles, videos, api_keys,
|
||||
account, mcp_oauth, marketing)
|
||||
oauth.register()
|
||||
billing._init_stripe()
|
||||
app.include_router(auth.router)
|
||||
|
|
@ -37,6 +38,8 @@ def setup_sync(app):
|
|||
app.include_router(api_keys.router)
|
||||
app.include_router(mcp_oauth.router)
|
||||
app.include_router(account.router)
|
||||
# Unsubscribe from the one commercial email (LSSI art. 21.2).
|
||||
app.include_router(marketing.router)
|
||||
|
||||
|
||||
async def setup_async(app, keep_reservation_ids=None):
|
||||
|
|
|
|||
|
|
@ -82,6 +82,20 @@ def _cooldown_ok(kind: str) -> bool:
|
|||
TELEGRAM_PREFIX = "OPENSHORTS ✂️ - "
|
||||
|
||||
|
||||
def user_ref(user_id) -> str:
|
||||
"""How a user is named in an operational alert: never by email address.
|
||||
|
||||
These alerts go to Telegram, whose Bot API is operated from outside the EEA
|
||||
with no adequacy decision and no DPA available to us — so the messages must
|
||||
not carry personal data. They used to read "alice@example.com bought +60
|
||||
minutes". The first 8 hex of the account uuid is enough for the operator to
|
||||
find the row (``select * from users where id::text like '3f9a1c2b%'``) and
|
||||
is not, on its own, an identifier of a person to anyone reading the chat.
|
||||
"""
|
||||
ref = str(user_id or "").replace("-", "")
|
||||
return f"user {ref[:8]}" if ref else "a user"
|
||||
|
||||
|
||||
async def send_telegram(text: str, *, raise_errors: bool = False):
|
||||
"""Push a plain-text message to the admin's Telegram chat. No-op if unset.
|
||||
|
||||
|
|
|
|||
|
|
@ -147,6 +147,16 @@ class Settings:
|
|||
def frontend_url(self) -> str:
|
||||
return os.environ.get("FRONTEND_URL", "https://openshorts.app").rstrip("/")
|
||||
|
||||
@property
|
||||
def public_api_url(self) -> str:
|
||||
"""Absolute base of this API as the internet sees it.
|
||||
|
||||
Needed by anything that has to put a working API link inside a message
|
||||
that leaves the browser — the unsubscribe link in an email, for one.
|
||||
Same variable app.py uses for the webhook payload's absolute URLs.
|
||||
"""
|
||||
return os.environ.get("PUBLIC_API_URL", "").rstrip("/")
|
||||
|
||||
@property
|
||||
def allowed_origins(self) -> list:
|
||||
raw = os.environ.get("ALLOWED_ORIGINS", "")
|
||||
|
|
|
|||
|
|
@ -10,6 +10,14 @@ Base = declarative_base()
|
|||
_engine = None
|
||||
_sessionmaker = None
|
||||
|
||||
# Columns added to tables that already exist in production. ADD COLUMN IF NOT
|
||||
# EXISTS is a no-op on a database that already has them and on a fresh one that
|
||||
# create_all just built.
|
||||
_ADDITIVE_COLUMNS = (
|
||||
"ALTER TABLE users ADD COLUMN IF NOT EXISTS "
|
||||
"marketing_opt_out BOOLEAN NOT NULL DEFAULT false",
|
||||
)
|
||||
|
||||
|
||||
async def init_engine():
|
||||
"""Create the async engine + sessionmaker and ensure the schema exists.
|
||||
|
|
@ -30,6 +38,15 @@ async def init_engine():
|
|||
# Case-insensitive email uniqueness.
|
||||
await conn.execute(text("CREATE EXTENSION IF NOT EXISTS citext"))
|
||||
await conn.run_sync(Base.metadata.create_all)
|
||||
# create_all creates missing TABLES and never ALTERs an existing one, so
|
||||
# a column added to a model that already shipped exists in the code and
|
||||
# not in the database. Each statement here is additive and idempotent;
|
||||
# keep them that way, and prefer Alembic once one of them is not.
|
||||
for statement in _ADDITIVE_COLUMNS:
|
||||
try:
|
||||
await conn.execute(text(statement))
|
||||
except Exception as e: # pragma: no cover - depends on the server
|
||||
print(f"⚠️ Additive schema step failed ({statement}): {e}")
|
||||
|
||||
|
||||
def get_sessionmaker():
|
||||
|
|
|
|||
106
cloud/marketing.py
Normal file
106
cloud/marketing.py
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
"""Opting out of the one email we send that is a commercial communication.
|
||||
|
||||
Every other message OpenShorts sends is a service notice: a sign-in link, "your
|
||||
clips are ready", "your free clips are deleted tomorrow", "your account has been
|
||||
deleted". ``send_out_of_minutes_email`` is not — it leads with a price and a
|
||||
Buy button, which makes it a comunicación comercial under LSSI art. 21. Art.
|
||||
21.2 permits it to an existing customer for a similar product, but only if
|
||||
*every single message* offers a simple, free way to refuse — and until now it
|
||||
offered none: no footer link and no ``List-Unsubscribe`` header.
|
||||
|
||||
The link has to work with no session (the reader is in their mail client, not
|
||||
the app) and must never expire, so it carries an HMAC of the user id keyed on
|
||||
the app's JWT secret. That token proves nothing except "the holder was sent an
|
||||
email addressed to this account", and the only thing it can do is set the flag
|
||||
— it cannot read anything, and it cannot re-subscribe anyone.
|
||||
"""
|
||||
import hashlib
|
||||
import hmac
|
||||
|
||||
from fastapi import APIRouter
|
||||
from fastapi.responses import HTMLResponse
|
||||
from sqlalchemy import update
|
||||
|
||||
from . import database
|
||||
from .config import settings
|
||||
from .models import User
|
||||
|
||||
router = APIRouter(prefix="/api/marketing", tags=["marketing"])
|
||||
|
||||
|
||||
def unsubscribe_token(user_id) -> str:
|
||||
return hmac.new(settings.jwt_secret.encode(), f"unsub:{user_id}".encode(),
|
||||
hashlib.sha256).hexdigest()[:32]
|
||||
|
||||
|
||||
def unsubscribe_url(user_id) -> str:
|
||||
"""The absolute link that goes in the email body and the header.
|
||||
|
||||
Empty when PUBLIC_API_URL is unset, and ``emails.py`` then falls back to a
|
||||
plain "reply to this email" line rather than printing a broken link.
|
||||
"""
|
||||
base = settings.public_api_url
|
||||
if not base or not settings.jwt_secret:
|
||||
return ""
|
||||
return (f"{base}/api/marketing/unsubscribe"
|
||||
f"?u={user_id}&t={unsubscribe_token(user_id)}")
|
||||
|
||||
|
||||
async def is_opted_out(user_id) -> bool:
|
||||
"""True when this account has refused commercial email."""
|
||||
from sqlalchemy import select
|
||||
async with database.session() as s:
|
||||
value = (await s.execute(
|
||||
select(User.marketing_opt_out).where(User.id == user_id)
|
||||
)).scalar_one_or_none()
|
||||
return bool(value)
|
||||
|
||||
|
||||
_PAGE = """<!doctype html><meta charset="utf-8">
|
||||
<title>%(title)s</title>
|
||||
<style>body{font:16px/1.6 system-ui,sans-serif;max-width:34rem;margin:12vh auto;
|
||||
padding:0 1.5rem;color:#111}h1{font-size:1.35rem}a{color:#111}</style>
|
||||
<h1>%(title)s</h1><p>%(body)s</p>"""
|
||||
|
||||
|
||||
def _page(title, body, status=200):
|
||||
return HTMLResponse(_PAGE % {"title": title, "body": body}, status_code=status)
|
||||
|
||||
|
||||
async def _opt_out(u: str, t: str):
|
||||
if not u or not t or not settings.jwt_secret:
|
||||
return _page("That link didn't work",
|
||||
"The unsubscribe link is incomplete. Email "
|
||||
"<a href='mailto:info@openshorts.app'>info@openshorts.app</a> "
|
||||
"and we'll do it by hand.", status=400)
|
||||
if not hmac.compare_digest(t, unsubscribe_token(u)):
|
||||
return _page("That link didn't work",
|
||||
"We couldn't verify this unsubscribe link. Email "
|
||||
"<a href='mailto:info@openshorts.app'>info@openshorts.app</a> "
|
||||
"and we'll do it by hand.", status=400)
|
||||
try:
|
||||
async with database.session() as s:
|
||||
async with s.begin():
|
||||
await s.execute(update(User).where(User.id == u)
|
||||
.values(marketing_opt_out=True))
|
||||
except Exception:
|
||||
# A malformed uuid, or the account is already gone. Both mean there is
|
||||
# nothing left to mail, so the honest answer is still "done".
|
||||
pass
|
||||
return _page("You're unsubscribed",
|
||||
"We won't send you upgrade emails again. You will still get "
|
||||
"the messages the service itself needs to send you — your "
|
||||
"sign-in link, and a warning before clips are deleted. You can "
|
||||
"delete your account entirely from Account → Delete account.")
|
||||
|
||||
|
||||
@router.get("/unsubscribe", response_class=HTMLResponse)
|
||||
async def unsubscribe_get(u: str = "", t: str = ""):
|
||||
return await _opt_out(u, t)
|
||||
|
||||
|
||||
@router.post("/unsubscribe", response_class=HTMLResponse)
|
||||
async def unsubscribe_post(u: str = "", t: str = ""):
|
||||
"""RFC 8058 one-click. Gmail and Outlook POST this URL from their own
|
||||
"Unsubscribe" button, without ever showing the user our page."""
|
||||
return await _opt_out(u, t)
|
||||
|
|
@ -24,6 +24,16 @@ class User(Base):
|
|||
stripe_customer_id = Column(Text, unique=True, nullable=True)
|
||||
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
||||
last_login_at = Column(DateTime(timezone=True), nullable=True)
|
||||
# Set by the unsubscribe link in the only email we send that is a
|
||||
# commercial communication rather than a service notice (the out-of-minutes
|
||||
# upsell). LSSI art. 21.2 lets us mail our own customers about a similar
|
||||
# product, but only if every message carries a way out — so this column is
|
||||
# what that link writes, and cloud/emails.py refuses to send when it is set.
|
||||
# Schema bootstrap is create_all, which never ALTERs: see
|
||||
# cloud/database.init_engine for the additive statement that adds it to an
|
||||
# existing database.
|
||||
marketing_opt_out = Column(Boolean, nullable=False, server_default="false",
|
||||
default=False)
|
||||
|
||||
|
||||
class MagicLinkToken(Base):
|
||||
|
|
|
|||
|
|
@ -22,10 +22,16 @@ def _clip_title(clip) -> str:
|
|||
return clip.get("title") or clip.get("video_title_for_youtube_short") or "Short"
|
||||
|
||||
|
||||
async def archive_job(user_id, job_id, clips, output_dir):
|
||||
async def archive_job(user_id, job_id, clips, output_dir, attestation=None):
|
||||
"""Upload a completed managed job's clips + metadata JSON to R2 and record
|
||||
them for history. The metadata (transcript included) plus the Project row
|
||||
make the whole job re-openable and editable later, not just viewable."""
|
||||
make the whole job re-openable and editable later, not just viewable.
|
||||
|
||||
``attestation`` is the "I hold the rights to this video" declaration the
|
||||
submitter ticked (truncated IP, user agent, timestamp, which input path).
|
||||
The privacy policy promises to keep it; the Project row is where it lives,
|
||||
so it is deleted with the account like everything else that names a user.
|
||||
"""
|
||||
if not settings.r2_configured or not clips:
|
||||
return
|
||||
metadata_r2_key = None
|
||||
|
|
@ -116,6 +122,20 @@ async def archive_job(user_id, job_id, clips, output_dir):
|
|||
"active_layers": None}
|
||||
for i, filename, _key, _title, _size in uploaded
|
||||
]}
|
||||
if attestation:
|
||||
state["rights_attestation"] = {
|
||||
"acknowledged": bool(attestation.get("acknowledged")),
|
||||
# Already truncated to a /24 (or /48) by app.py.
|
||||
"ip_network": attestation.get("ip"),
|
||||
"user_agent": (attestation.get("user_agent") or "")[:300],
|
||||
"timestamp": attestation.get("timestamp"),
|
||||
"source": attestation.get("source"),
|
||||
}
|
||||
elif proj is not None and isinstance(proj.state, dict):
|
||||
# Re-archiving must not erase the original declaration.
|
||||
prior = proj.state.get("rights_attestation")
|
||||
if prior:
|
||||
state["rights_attestation"] = prior
|
||||
total = sum(u[4] for u in uploaded)
|
||||
if proj is None:
|
||||
s.add(Project(user_id=user_id, job_id=job_id, title=uploaded[0][3],
|
||||
|
|
|
|||
|
|
@ -10,12 +10,12 @@
|
|||
<meta name="theme-color" content="#0b0d12" />
|
||||
<meta name="color-scheme" content="dark" />
|
||||
|
||||
<!-- Fonts: Lumen system (Instrument Serif display · Geist body · JetBrains Mono labels) -->
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link
|
||||
href="https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap"
|
||||
rel="stylesheet" />
|
||||
<!-- Fonts: Lumen system (Instrument Serif display · Geist body · JetBrains Mono labels).
|
||||
Served from this origin, not fonts.googleapis.com: a Google-hosted
|
||||
stylesheet sends every visitor's IP address to a US processor before the
|
||||
page has rendered and before anyone consented to anything. See
|
||||
public/fonts.css for how the subsets were generated. -->
|
||||
<link rel="stylesheet" href="/fonts.css" />
|
||||
|
||||
<!-- Primary SEO Meta Tags -->
|
||||
<title>OpenShorts - Open Source AI Clip Generator | Free Self-Hosted, Cloud from $12/mo</title>
|
||||
|
|
@ -254,31 +254,45 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<!-- Analytics — opt-in, disabled by default.
|
||||
<!-- Analytics — opt-in, disabled by default, and never loaded before consent.
|
||||
A plain `npm run build` (and every local `npm run dev`) leaves the two
|
||||
VITE_OPENPANEL_* variables unset, so nothing is initialised, no third
|
||||
party script is fetched and no request leaves the browser. Self-hosted
|
||||
instances are silent unless you deliberately turn this on.
|
||||
VITE_OPENPANEL_* variables unset, so nothing is initialised, no script is
|
||||
fetched and no request leaves the browser. Self-hosted instances are
|
||||
silent unless you deliberately turn this on.
|
||||
|
||||
Nothing here RUNS on page load any more: it only publishes
|
||||
window.__osAnalyticsInit, and the React consent manager
|
||||
(src/lib/consent.js) calls it once the visitor has actually accepted the
|
||||
analytics category. Loading a tracker in the static <head> and asking
|
||||
afterwards is the exact pattern LSSI art. 22.2 forbids.
|
||||
|
||||
op1.js is served from this origin (public/op1.js), not from
|
||||
openpanel.dev: a third-party script sees the visitor's IP and can be
|
||||
changed under us at any time.
|
||||
|
||||
To collect analytics for your own deployment: point
|
||||
VITE_OPENPANEL_API_URL / VITE_OPENPANEL_CLIENT_ID at your own OpenPanel
|
||||
instance (see .env.example) and add your hostname to ANALYTICS_HOSTS. -->
|
||||
<script>
|
||||
window.op = window.op || function () { var n = []; return new Proxy(function () { arguments.length && n.push([].slice.call(arguments)); }, { get: function (t, r) { return "q" === r ? n : function () { n.push([r].concat([].slice.call(arguments))); }; }, has: function (t, r) { return "q" === r; } }); }();
|
||||
(function () {
|
||||
// Vite substitutes these at build time and leaves the literal
|
||||
// "%VITE_...%" placeholder in place when the variable is undefined.
|
||||
window.__osAnalyticsInit = (function () {
|
||||
var started = false;
|
||||
return function () {
|
||||
if (started) return false;
|
||||
// Vite substitutes these at build time and leaves the placeholder literal
|
||||
// in place when the variable is undefined.
|
||||
var apiUrl = "%VITE_OPENPANEL_API_URL%";
|
||||
var clientId = "%VITE_OPENPANEL_CLIENT_ID%";
|
||||
var unset = function (v) { return !v || v.charAt(0) === "%"; };
|
||||
if (unset(apiUrl) || unset(clientId)) return;
|
||||
if (unset(apiUrl) || unset(clientId)) return false;
|
||||
|
||||
// Second gate: hosts allowed to report. A dist/ built with credentials
|
||||
// stays inert anywhere else (a fork, a mirror, a preview domain), so a
|
||||
// deployment can never report into somebody else's dashboard.
|
||||
var ANALYTICS_HOSTS = /^(www\.)?openshorts\.app$/;
|
||||
if (!ANALYTICS_HOSTS.test(location.hostname)) return;
|
||||
if (!ANALYTICS_HOSTS.test(location.hostname)) return false;
|
||||
|
||||
started = true;
|
||||
window.op("init", {
|
||||
apiUrl: apiUrl,
|
||||
clientId: clientId,
|
||||
|
|
@ -288,10 +302,12 @@
|
|||
});
|
||||
|
||||
var s = document.createElement("script");
|
||||
s.src = "https://openpanel.dev/op1.js";
|
||||
s.src = "/op1.js";
|
||||
s.defer = true;
|
||||
s.async = true;
|
||||
document.head.appendChild(s);
|
||||
return true;
|
||||
};
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
|||
143
dashboard/public/fonts.css
Normal file
143
dashboard/public/fonts.css
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
/* Self-hosted web fonts (Lumen system).
|
||||
*
|
||||
* These faces used to come from fonts.googleapis.com + fonts.gstatic.com, which
|
||||
* meant every visitor's IP address reached Google before they had consented to
|
||||
* anything and before they had read a word of the page — a transfer to a US
|
||||
* processor with no purpose the visitor could refuse. The files are ordinary
|
||||
* OFL-licensed WOFF2 subsets, so serving them from our own origin removes the
|
||||
* third party entirely and loads faster besides.
|
||||
*
|
||||
* Generated from the Google Fonts CSS API (latin + latin-ext subsets only) on
|
||||
* 4 September 2026. Regenerate by re-downloading css2 for the same families,
|
||||
* keeping the latin blocks and rewriting the src URLs to /fonts/.
|
||||
*/
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(/fonts/geist-400-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(/fonts/geist-400-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/geist-500-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/geist-500-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url(/fonts/geist-600-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Geist';
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-display: swap;
|
||||
src: url(/fonts/geist-600-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Instrument Serif';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(/fonts/instrument-serif-400-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Instrument Serif';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(/fonts/instrument-serif-400-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'JetBrains Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(/fonts/jetbrains-mono-400-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'JetBrains Mono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url(/fonts/jetbrains-mono-400-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'JetBrains Mono';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/jetbrains-mono-500-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'JetBrains Mono';
|
||||
font-style: normal;
|
||||
font-weight: 500;
|
||||
font-display: swap;
|
||||
src: url(/fonts/jetbrains-mono-500-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
|
||||
/* latin-ext */
|
||||
@font-face {
|
||||
font-family: 'Noto Serif';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-stretch: 100%;
|
||||
font-display: swap;
|
||||
src: url(/fonts/noto-serif-700-latin-ext.woff2) format('woff2');
|
||||
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
||||
}
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: 'Noto Serif';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-stretch: 100%;
|
||||
font-display: swap;
|
||||
src: url(/fonts/noto-serif-700-latin.woff2) format('woff2');
|
||||
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
||||
}
|
||||
BIN
dashboard/public/fonts/geist-400-latin-ext.woff2
Normal file
BIN
dashboard/public/fonts/geist-400-latin-ext.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/geist-400-latin.woff2
Normal file
BIN
dashboard/public/fonts/geist-400-latin.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/geist-500-latin-ext.woff2
Normal file
BIN
dashboard/public/fonts/geist-500-latin-ext.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/geist-500-latin.woff2
Normal file
BIN
dashboard/public/fonts/geist-500-latin.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/geist-600-latin-ext.woff2
Normal file
BIN
dashboard/public/fonts/geist-600-latin-ext.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/geist-600-latin.woff2
Normal file
BIN
dashboard/public/fonts/geist-600-latin.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/instrument-serif-400-latin-ext.woff2
Normal file
BIN
dashboard/public/fonts/instrument-serif-400-latin-ext.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/instrument-serif-400-latin.woff2
Normal file
BIN
dashboard/public/fonts/instrument-serif-400-latin.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/jetbrains-mono-400-latin-ext.woff2
Normal file
BIN
dashboard/public/fonts/jetbrains-mono-400-latin-ext.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/jetbrains-mono-400-latin.woff2
Normal file
BIN
dashboard/public/fonts/jetbrains-mono-400-latin.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/jetbrains-mono-500-latin-ext.woff2
Normal file
BIN
dashboard/public/fonts/jetbrains-mono-500-latin-ext.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/jetbrains-mono-500-latin.woff2
Normal file
BIN
dashboard/public/fonts/jetbrains-mono-500-latin.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/noto-serif-700-latin-ext.woff2
Normal file
BIN
dashboard/public/fonts/noto-serif-700-latin-ext.woff2
Normal file
Binary file not shown.
BIN
dashboard/public/fonts/noto-serif-700-latin.woff2
Normal file
BIN
dashboard/public/fonts/noto-serif-700-latin.woff2
Normal file
Binary file not shown.
1
dashboard/public/op1.js
Normal file
1
dashboard/public/op1.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -22,7 +22,7 @@
|
|||
* publishing this text is only half of it.
|
||||
*/
|
||||
|
||||
const PUBLISHED = '2026-08-29'
|
||||
const PUBLISHED = '2026-09-04'
|
||||
|
||||
const TERMS_EN = `
|
||||
<h2>1. Who we are</h2>
|
||||
|
|
@ -104,18 +104,24 @@ submit), we engage only the sub-processors listed in our
|
|||
apply appropriate security measures, and we delete the content under the
|
||||
retention rules in Section 13 or earlier on your instruction. If you need a
|
||||
countersigned Data Processing Agreement for your business, request it at
|
||||
info@openshorts.app. When you use bring-your-own-key mode, your content flows
|
||||
directly between your instance and the AI provider under your own agreement
|
||||
with them.</p>
|
||||
info@openshorts.app. When you self-host OpenShorts with your own keys, your
|
||||
content flows directly between your own instance and the AI provider under
|
||||
your own agreement with them. On OpenShorts Cloud that is not the case even
|
||||
when you supply your own provider key: the request is made by our servers,
|
||||
which means the content passes through them and this Section 6 applies to it
|
||||
in full.</p>
|
||||
|
||||
<h2>7. AI processing — what runs where</h2>
|
||||
<p>The service uses AI systems to do its work, and we name them: transcription
|
||||
runs on our own servers (Whisper-family and NVIDIA Parakeet models); moment
|
||||
selection, titling and layout decisions use Google's Gemini API; optional voice
|
||||
dubbing uses ElevenLabs. Your video content, audio and transcript are sent to
|
||||
these providers only as needed to perform the job you requested, under
|
||||
agreements that prohibit them from using paid-API customer data to train their
|
||||
models.</p>
|
||||
selection, titling, layout decisions and generated thumbnails use Google's
|
||||
Gemini API; optional voice dubbing and AI voices use ElevenLabs; AI Shorts
|
||||
uses fal.ai (Flux for actor images, Kling and Hailuo for the animated
|
||||
presenter). Your video content, audio, transcript, sampled frames and any
|
||||
actor photo you supply are sent to these providers only as needed to perform
|
||||
the job you requested, under agreements that prohibit them from using
|
||||
paid-API customer data to train their models. Section 4 of the
|
||||
<a href="/privacy">Privacy Policy</a> says exactly what each one receives.</p>
|
||||
<p><strong>We do not train AI models on your content, and we do not sell it or
|
||||
share it for training.</strong></p>
|
||||
<p>AI output is probabilistic: clip selections, transcripts, translations,
|
||||
|
|
@ -125,10 +131,13 @@ unique. You are responsible for reviewing AI output before you use or publish
|
|||
it. You may not use the service or its output to develop or train a competing
|
||||
model or service.</p>
|
||||
<p>Clips that use AI dubbing contain synthetic speech, and so do videos made
|
||||
with an AI actor. We mark those files as AI-generated in a machine-readable
|
||||
format, which is what Article 50(2) of Regulation (EU) 2024/1689 (the AI Act)
|
||||
requires of us as the provider; you must not remove or strip that marking. We
|
||||
do not burn a visible label into the picture. When you publish one of those
|
||||
with an AI actor and thumbnails generated by the image model. We mark those
|
||||
files as AI-generated in a machine-readable format — a metadata tag on video,
|
||||
an XMP <code>DigitalSourceType: trainedAlgorithmicMedia</code> marking on
|
||||
generated images — which is what Article 50(2) of Regulation (EU) 2024/1689
|
||||
(the AI Act) requires of us as the provider; you must not remove or strip that
|
||||
marking. Be aware that platforms commonly re-encode uploads and that a
|
||||
re-encode can drop it. We do not burn a visible label into the picture. When you publish one of those
|
||||
clips, revealing to your audience that it is artificially generated is your own
|
||||
duty as the deployer under Article 50(4), and the AI-content label each
|
||||
platform offers (TikTok, Instagram, YouTube and the rest) is the normal way to
|
||||
|
|
@ -380,18 +389,26 @@ recurrimos únicamente a los subencargados listados en la
|
|||
almacenamiento y entrega), aplicamos medidas de seguridad apropiadas y
|
||||
eliminamos el contenido según las reglas de la cláusula 13 o antes si nos lo
|
||||
pides. Si tu empresa necesita un contrato de encargo de tratamiento firmado,
|
||||
solicítalo en info@openshorts.app. En el modo con claves propias (BYOK), tu
|
||||
contenido fluye directamente entre tu instancia y el proveedor de IA bajo tu
|
||||
propio acuerdo con él.</p>
|
||||
solicítalo en info@openshorts.app. Cuando autoalojas OpenShorts con tus
|
||||
propias claves, tu contenido fluye directamente entre tu instancia y el
|
||||
proveedor de IA bajo tu propio acuerdo con él. En OpenShorts Cloud eso no es
|
||||
así ni siquiera si aportas tu propia clave de proveedor: la petición la hacen
|
||||
nuestros servidores, es decir que el contenido pasa por ellos y esta cláusula
|
||||
6 le aplica íntegramente.</p>
|
||||
|
||||
<h2>7. Procesamiento con IA — qué se ejecuta y dónde</h2>
|
||||
<p>El servicio usa sistemas de IA y los nombramos: la transcripción se ejecuta
|
||||
en nuestros propios servidores (modelos de la familia Whisper y NVIDIA
|
||||
Parakeet); la selección de momentos, los títulos y las decisiones de encuadre
|
||||
usan la API Gemini de Google; el doblaje de voz opcional usa ElevenLabs. Tu
|
||||
vídeo, audio y transcripción se envían a estos proveedores solo en la medida
|
||||
necesaria para realizar el trabajo que pediste, bajo acuerdos que les prohíben
|
||||
usar los datos de clientes de API de pago para entrenar sus modelos.</p>
|
||||
Parakeet); la selección de momentos, los títulos, las decisiones de encuadre y
|
||||
las miniaturas generadas usan la API Gemini de Google; el doblaje de voz y las
|
||||
voces de IA opcionales usan ElevenLabs; AI Shorts usa fal.ai (Flux para las
|
||||
imágenes de actor, Kling y Hailuo para el presentador animado). Tu vídeo,
|
||||
audio, transcripción, fotogramas muestreados y cualquier foto de actor que
|
||||
aportes se envían a estos proveedores solo en la medida necesaria para
|
||||
realizar el trabajo que pediste, bajo acuerdos que les prohíben usar los datos
|
||||
de clientes de API de pago para entrenar sus modelos. El apartado 4 de la
|
||||
<a href="/privacidad">Política de Privacidad</a> detalla qué recibe cada
|
||||
uno.</p>
|
||||
<p><strong>No entrenamos modelos de IA con tu contenido, ni lo vendemos ni lo
|
||||
cedemos para entrenamiento.</strong></p>
|
||||
<p>El resultado de la IA es probabilístico: las selecciones de clips,
|
||||
|
|
@ -401,10 +418,15 @@ por lo que los resultados no se garantizan únicos. Eres responsable de revisar
|
|||
el resultado antes de usarlo o publicarlo. No puedes usar el servicio ni sus
|
||||
resultados para desarrollar o entrenar un modelo o servicio competidor.</p>
|
||||
<p>Los clips con doblaje de IA contienen voz sintética, y también los vídeos
|
||||
hechos con un actor de IA. Marcamos esos ficheros como generados con IA en un
|
||||
formato legible por máquina, que es lo que nos exige a nosotros como proveedor
|
||||
el artículo 50.2 del Reglamento (UE) 2024/1689 (Reglamento de IA); no debes
|
||||
eliminar esa marca. No quemamos una etiqueta visible sobre la imagen. Al
|
||||
hechos con un actor de IA y las miniaturas generadas por el modelo de imagen.
|
||||
Marcamos esos ficheros como generados con IA en un formato legible por máquina
|
||||
— una etiqueta de metadatos en el vídeo y un marcado XMP
|
||||
<code>DigitalSourceType: trainedAlgorithmicMedia</code> en las imágenes
|
||||
generadas —, que es lo que nos exige a nosotros como proveedor el artículo
|
||||
50.2 del Reglamento (UE) 2024/1689 (Reglamento de IA); no debes eliminar esa
|
||||
marca. Ten en cuenta que las plataformas recodifican habitualmente lo que se
|
||||
sube y que una recodificación puede eliminarla. No quemamos una etiqueta
|
||||
visible sobre la imagen. Al
|
||||
publicar uno de esos clips, revelar a tu audiencia que es contenido generado
|
||||
artificialmente es tu propia obligación como responsable del despliegue según
|
||||
el artículo 50.4, y la etiqueta de contenido con IA que ofrece cada plataforma
|
||||
|
|
@ -614,63 +636,126 @@ data and we act as your processor on your instructions — see Section 6 of the
|
|||
<a href="/terms">Terms of Service</a>.</p>
|
||||
<h3>Your rights declaration</h3>
|
||||
<p>Each time you submit a job you confirm you have the rights to the content.
|
||||
We keep that declaration with its date, your IP address and browser
|
||||
identifier, as evidence of diligence in case of copyright or image-rights
|
||||
disputes. Basis: legitimate interest in establishing and defending legal
|
||||
claims (Art. 6.1.f).</p>
|
||||
<h3>Service emails</h3>
|
||||
<p>We email you magic links, receipts, renewal reminders, clip-ready and
|
||||
deletion warnings. These are part of the service, not marketing. Basis:
|
||||
contract (Art. 6.1.b). If we ever send commercial newsletters, we will ask for
|
||||
your consent first and every message will carry an unsubscribe link.</p>
|
||||
We keep that declaration with its date, your browser identifier and your IP
|
||||
address <em>truncated to its network</em> (the last part is discarded, so it
|
||||
identifies a network and not a device), as evidence of diligence in case of
|
||||
copyright or image-rights disputes. It is stored with the project it belongs
|
||||
to, and is deleted with your account. Basis: legitimate interest in
|
||||
establishing and defending legal claims (Art. 6.1.f).</p>
|
||||
<h3>Service emails, and the one that is not</h3>
|
||||
<p>We email you magic links, receipts, renewal reminders, clip-ready notices
|
||||
and warnings before clips are deleted. These are part of the service, not
|
||||
marketing. Basis: contract (Art. 6.1.b). One message is different: if you are
|
||||
on the free plan and run out of minutes, we send a single email suggesting an
|
||||
upgrade. That one is a commercial communication (Art. 21.2 of Spanish Law
|
||||
34/2002, which permits it about our own similar products to our own
|
||||
customers), it carries an unsubscribe link and a one-click unsubscribe header
|
||||
in every send, and refusing it stops it permanently while leaving the service
|
||||
messages untouched. We do not run a newsletter and we never sell or rent your
|
||||
address.</p>
|
||||
<h3>Product analytics</h3>
|
||||
<p>We run our own analytics (a self-hosted OpenPanel instance on our own
|
||||
servers). No third-party trackers, no advertising pixels, no cross-site
|
||||
tracking, and nothing is shared with anyone. Aggregate audience measurement is
|
||||
exempt from consent under the Spanish supervisory authority's (AEPD) criteria;
|
||||
usage events linked to your account (which features you use, whether jobs
|
||||
succeed) are processed under our legitimate interest in improving and securing
|
||||
the product (Art. 6.1.f) — you can object at any time by emailing
|
||||
info@openshorts.app.</p>
|
||||
<p>We measure how the app is used with OpenPanel, running on an instance we
|
||||
operate ourselves; the measurement script is served from this domain, not from
|
||||
a third party. <strong>Nothing loads until you accept the "audience
|
||||
measurement" category in the cookie banner</strong>, and rejecting it is one
|
||||
click in the same banner — you can change your mind any time from the
|
||||
"cookies" link in the footer. We send the account's internal identifier (a
|
||||
random uuid) with these events so we can tell first-time from repeat use; we
|
||||
do <em>not</em> send your email address. No advertising pixels, no cross-site
|
||||
tracking, nothing shared with anyone. Basis: your consent (Art. 6.1.a GDPR and
|
||||
Art. 22.2 of Law 34/2002); withdraw it at any time in the banner or by
|
||||
emailing info@openshorts.app.</p>
|
||||
<h3>Security and anti-abuse</h3>
|
||||
<p>Server logs, IP-based rate limits and fraud signals, kept to protect the
|
||||
service and its users. Basis: legitimate interest (Art. 6.1.f).</p>
|
||||
service and its users. Basis: legitimate interest (Art. 6.1.f). Application
|
||||
logs are kept in the container's rotating log for no more than 7 days and are
|
||||
not aggregated elsewhere; they do not contain your email address.</p>
|
||||
<p>We do not process special categories of data (Art. 9 GDPR) as part of the
|
||||
service, we make no automated decisions with legal effects on you (Art. 22
|
||||
GDPR), and <strong>we do not use your content or your data to train AI models
|
||||
— ours or anyone else's — nor sell it.</strong></p>
|
||||
|
||||
<h2>3. Cookies and local storage</h2>
|
||||
<p>The site sets no third-party cookies and shows no cookie banner because it
|
||||
does not need one: everything stored in your browser is strictly necessary to
|
||||
provide what you asked for. Specifically: your session token (to keep you
|
||||
signed in), your interface preferences (like your last-used editor settings),
|
||||
and — if you use bring-your-own-key mode — your AI provider API keys, which
|
||||
are stored encrypted in your own browser and are sent only to perform your
|
||||
jobs, never stored on our servers. Our self-hosted, first-party audience
|
||||
measurement operates under the AEPD's consent exemption for strictly
|
||||
statistical analytics; identifiers live no longer than 13 months and raw data
|
||||
no longer than 25 months.</p>
|
||||
<p>We set no third-party cookies and load no third-party script on page load.
|
||||
What the site stores falls into two groups.</p>
|
||||
<p><strong>Strictly necessary — always on, no consent required.</strong> All of
|
||||
it is first-party and lives in your browser's local storage, not in a cookie:
|
||||
your session token (keeps you signed in), a short-lived media token (lets your
|
||||
browser fetch your own clips and thumbnails, which are not public), your
|
||||
interface preferences (last-used editor settings, tab, language), the
|
||||
first-visit referrer we record once at sign-up, and — if you use
|
||||
bring-your-own-key mode — your AI provider API keys. Those keys are
|
||||
<em>obfuscated</em>, not encrypted: the value is scrambled so it is not
|
||||
readable at a glance in developer tools, which is not the same as
|
||||
cryptographic protection, and anyone with access to your browser profile could
|
||||
recover them. They are sent only to perform your own jobs and are never stored
|
||||
on our servers. Your consent record itself is also stored here.</p>
|
||||
<p><strong>Audience measurement — always on, first-party only.</strong> OpenPanel
|
||||
(see section 2) writes an anonymous visitor identifier. The script is served
|
||||
from this domain; the instance is ours, the data is never shared and never used
|
||||
cross-site, which under the AEPD/CNIL criteria exempts it from prior consent.
|
||||
The consent banner is only shown to visitors in the EEA, the UK and Switzerland;
|
||||
identifiers live no longer than 13 months and raw data no longer than 25
|
||||
months. "Reject all" and "Accept all" sit side by side in the banner, and the
|
||||
"cookies" link in the footer reopens it so you can withdraw consent as easily
|
||||
as you gave it.</p>
|
||||
<p><strong>Marketing.</strong> We use no advertising or remarketing trackers.
|
||||
The category exists in the banner so that if we ever add one it starts
|
||||
switched off.</p>
|
||||
|
||||
<h2>4. Who receives data (processors) and where</h2>
|
||||
<p>We use a short list of providers, each bound by a data processing agreement,
|
||||
and only for the purpose stated:</p>
|
||||
<p>Every provider we use, what each one receives, and where it is. The
|
||||
machine-readable version of this list, with the transfer safeguard for each,
|
||||
is kept in the public repository at
|
||||
<a href="https://github.com/mutonby/openshorts/blob/main/docs/compliance/subprocessors.md">docs/compliance/subprocessors.md</a>
|
||||
and changes are recorded there.</p>
|
||||
<ul>
|
||||
<li><strong>Google (Gemini API)</strong> — AI analysis of your video's
|
||||
transcript and frames to select moments and layouts. Google's paid API terms
|
||||
<li><strong>Google (Gemini API)</strong> — AI analysis to select moments,
|
||||
layouts, titles and thumbnails. It receives your video's transcript and
|
||||
sampled frames (which may show faces), the reference photo you pick for a
|
||||
thumbnail, and — only when the "screencast" layout check runs — the source
|
||||
video file itself, which we delete from Google's file store as soon as the
|
||||
answer comes back rather than letting it expire there. Google's paid API terms
|
||||
prohibit using customer data to train models. USA.</li>
|
||||
<li><strong>ElevenLabs</strong> — AI dubbing, only when you request it. USA.</li>
|
||||
<li><strong>ElevenLabs</strong> — AI dubbing and AI voices, only when you ask
|
||||
for it. Receives the clip's audio, which means the voice of whoever is
|
||||
speaking in it. USA.</li>
|
||||
<li><strong>fal.ai</strong> — the image and video models behind AI Shorts
|
||||
(Flux for actor images, Kling and Hailuo for the talking avatar). Receives the
|
||||
actor photo you upload or generate — which may be a photograph of a real
|
||||
person — and the audio to lip-sync it to. USA.</li>
|
||||
<li><strong>Stripe</strong> — payments and invoicing. USA/EU.</li>
|
||||
<li><strong>Cloudflare R2 and Amazon Web Services S3</strong> — storage of your
|
||||
clips and project files. EU/USA regions.</li>
|
||||
<li><strong>Cloudflare</strong> — DNS and CDN in front of the website, so it
|
||||
sees the IP address and request metadata of every visitor. USA/global.</li>
|
||||
<li><strong>Hetzner and Contabo</strong> — the servers the service runs on.
|
||||
Germany.</li>
|
||||
<li><strong>Download proxies (DataImpulse and static ISP proxies)</strong> —
|
||||
when a video platform refuses our servers directly, the download is routed
|
||||
through a commercial proxy. It sees the URL of the video and carries its
|
||||
bytes; it receives no account data of yours.</li>
|
||||
<li><strong>Upload-Post</strong> — publishing to social accounts you connect,
|
||||
only on your instruction. Operated by TONVI TECH SL under this same
|
||||
policy.</li>
|
||||
only on your instruction, and the custodian of the platform tokens those
|
||||
connections produce. Operated by TONVI TECH SL under this same policy.</li>
|
||||
<li><strong>Aikount</strong> — our own invoicing system, which issues the
|
||||
Spanish legal invoice for your payment and therefore receives your billing
|
||||
name, address and email from Stripe. Operated by TONVI TECH SL, servers in
|
||||
Germany.</li>
|
||||
<li><strong>OpenPanel</strong> — first-party audience measurement, exempt
|
||||
from prior consent (section 3). The instance is ours and runs on our own servers in Germany;
|
||||
the script is served from this domain.</li>
|
||||
<li><strong>Namecheap Private Email</strong> — delivery of service emails.
|
||||
USA.</li>
|
||||
<li><strong>Google (sign in with Google)</strong> — only if you choose it, and
|
||||
only the "openid email profile" scope, so we learn your address and Google
|
||||
account id and nothing else. USA.</li>
|
||||
</ul>
|
||||
<p>Two things we deliberately do <em>not</em> send anywhere: our internal
|
||||
operational alerts identify you by the first characters of your account
|
||||
identifier, never by your email address or the title of your video; and the
|
||||
face detection that decides where to crop runs on our own servers and
|
||||
produces no biometric template.</p>
|
||||
<p>Where a provider processes data outside the European Economic Area, the
|
||||
transfer relies on the EU–US Data Privacy Framework where the provider is
|
||||
certified and, in any case, on the European Commission's Standard Contractual
|
||||
|
|
@ -686,16 +771,33 @@ days.</li>
|
|||
<li>Account data: while your account exists; after deletion, only what is
|
||||
needed to meet legal obligations or resolve disputes.</li>
|
||||
<li>Invoicing data: 6 years (Spanish commercial law).</li>
|
||||
<li>Rights declarations and related logs: up to 5 years, matching the statute
|
||||
of limitations for civil claims.</li>
|
||||
<li>Rights declarations: up to 5 years with the project they belong to,
|
||||
matching the statute of limitations for civil claims, and deleted with your
|
||||
account if you delete it sooner.</li>
|
||||
<li>Working files on the processing server (the source download, the working
|
||||
copies): 1 hour after the job finishes. Uploads waiting for a job: 6 hours.</li>
|
||||
<li>Generated thumbnails and the video frames sampled to make them: 24 hours
|
||||
after you last downloaded one.</li>
|
||||
<li>Photos you upload to drive an AI actor: deleted with the job that used
|
||||
them, within the hour.</li>
|
||||
<li>Application logs: 7 days in the container's rotating log.</li>
|
||||
<li>Encrypted database backups: 30 days, after which a deletion you made is
|
||||
also gone from every copy.</li>
|
||||
<li>Analytics identifiers: 13 months; raw analytics data: 25 months.</li>
|
||||
</ul>
|
||||
<p>The full, per-item version of this table, written against the actual code
|
||||
that enforces it, is in the public repository at
|
||||
<a href="https://github.com/mutonby/openshorts/blob/main/docs/compliance/retencion.md">docs/compliance/retencion.md</a>.</p>
|
||||
|
||||
<h2>6. Your rights</h2>
|
||||
<p>You can ask us for access, rectification, erasure, restriction, portability
|
||||
of your data, and object to processing based on legitimate interest — just
|
||||
email info@openshorts.app from your account address; we answer within one
|
||||
month. You do not need to ask us to erase your account: <strong>Account →
|
||||
of your data, and object to processing based on legitimate interest — email
|
||||
info@openshorts.app or info@openshorts.app from your account address; we answer
|
||||
within one month. Two of these you can exercise yourself, right now, without
|
||||
asking anyone: <strong>Account → Download my data</strong> gives you a JSON
|
||||
file with everything our database holds about you plus a download link for
|
||||
every clip in your library (Art. 20), and <strong>Account → Delete account</strong>
|
||||
erases it (Art. 17). You do not need to ask us to erase your account: <strong>Account →
|
||||
Delete account</strong> in the dashboard does it yourself, immediately and
|
||||
permanently, taking your projects, clips, transcripts, API keys and social
|
||||
connections with it and cancelling any active subscription. Two things survive
|
||||
|
|
@ -740,7 +842,22 @@ they provide your written permission.</p>
|
|||
|
||||
<h2>8. Age</h2>
|
||||
<p>The service is not directed at children. You must be at least 16, or the
|
||||
age of digital consent in your country if higher, to create an account.</p>
|
||||
age of digital consent in your country if higher, to create an account, and
|
||||
you are asked to confirm that when you sign up. If you believe a minor has
|
||||
created an account, write to info@openshorts.app and we will delete it.</p>
|
||||
|
||||
<h2>8 bis. AI-generated content</h2>
|
||||
<p>Dubbing, AI Shorts and AI thumbnails produce synthetic content. We mark
|
||||
what we generate in a machine-readable way — a metadata tag on video files and
|
||||
an XMP <code>DigitalSourceType: trainedAlgorithmicMedia</code> marking on
|
||||
generated images — as required by Art. 50(2) of Regulation (EU) 2024/1689 (the
|
||||
AI Act). That marking does not always survive a platform re-encoding your
|
||||
upload, so when you publish synthetic content you are the one who must turn on
|
||||
the platform's own AI-content label (Art. 50(4)); the app reminds you at the
|
||||
moment you post. Cloning a voice or animating a photograph of a real person
|
||||
without their agreement is prohibited by the
|
||||
<a href="/terms">Terms of Service</a>, and both features ask you to confirm
|
||||
you have that agreement before they run.</p>
|
||||
|
||||
<h2>9. Changes</h2>
|
||||
<p>If we change this policy in any meaningful way we will tell you by email or
|
||||
|
|
@ -778,66 +895,134 @@ instrucciones — ver cláusula 6 de los <a href="/terminos">Términos de
|
|||
Servicio</a>.</p>
|
||||
<h3>Tu declaración de derechos</h3>
|
||||
<p>Cada vez que envías un trabajo confirmas que tienes derechos sobre el
|
||||
contenido. Conservamos esa declaración con su fecha, tu dirección IP y el
|
||||
identificador de tu navegador, como prueba de diligencia ante posibles
|
||||
disputas de derechos de autor o de imagen. Base: interés legítimo en la
|
||||
formulación y defensa de reclamaciones (art. 6.1.f).</p>
|
||||
<h3>Emails de servicio</h3>
|
||||
contenido. Conservamos esa declaración con su fecha, el identificador de tu
|
||||
navegador y tu dirección IP <em>truncada a su red</em> (descartamos la parte
|
||||
final, de modo que identifica una red y no un dispositivo), como prueba de
|
||||
diligencia ante posibles disputas de derechos de autor o de imagen. Se guarda
|
||||
junto al proyecto al que pertenece y se elimina con tu cuenta. Base: interés
|
||||
legítimo en la formulación y defensa de reclamaciones (art. 6.1.f).</p>
|
||||
<h3>Emails de servicio, y el que no lo es</h3>
|
||||
<p>Te enviamos enlaces de acceso, recibos, avisos de renovación, avisos de
|
||||
clips listos y de eliminación. Forman parte del servicio, no son marketing.
|
||||
Base: contrato (art. 6.1.b). Si algún día enviamos boletines comerciales, te
|
||||
pediremos consentimiento antes y cada mensaje llevará enlace de baja.</p>
|
||||
clips listos y avisos previos a la eliminación de clips. Forman parte del
|
||||
servicio, no son marketing. Base: contrato (art. 6.1.b). Hay un mensaje
|
||||
distinto: si estás en el plan gratuito y agotas tus minutos, te enviamos un
|
||||
único email sugiriendo mejorar de plan. Ese sí es una comunicación comercial
|
||||
(art. 21.2 de la Ley 34/2002, que la permite sobre productos propios similares
|
||||
a clientes propios), lleva enlace de baja y cabecera de baja en un clic en
|
||||
todos sus envíos, y darte de baja lo detiene de forma permanente sin afectar a
|
||||
los mensajes de servicio. No tenemos boletín y jamás vendemos ni cedemos tu
|
||||
dirección.</p>
|
||||
<h3>Analítica de producto</h3>
|
||||
<p>Usamos nuestra propia analítica (una instancia autoalojada de OpenPanel en
|
||||
nuestros propios servidores). Sin rastreadores de terceros, sin píxeles
|
||||
publicitarios, sin seguimiento entre sitios, y sin compartir nada con nadie.
|
||||
La medición de audiencia agregada está exenta de consentimiento según los
|
||||
criterios de la AEPD; los eventos de uso vinculados a tu cuenta (qué funciones
|
||||
usas, si los trabajos terminan bien) se tratan bajo nuestro interés legítimo en
|
||||
mejorar y proteger el producto (art. 6.1.f) — puedes oponerte en cualquier
|
||||
momento escribiendo a info@openshorts.app.</p>
|
||||
<p>Medimos el uso de la aplicación con OpenPanel, en una instancia que
|
||||
operamos nosotros mismos; el script de medición se sirve desde este dominio y
|
||||
no desde un tercero. <strong>No se carga nada hasta que aceptas la categoría
|
||||
"medición de audiencia" en el banner de cookies</strong>, y rechazarla es un
|
||||
solo clic en ese mismo banner — puedes cambiar de opinión cuando quieras desde
|
||||
el enlace "cookies" del pie de página. Con esos eventos enviamos el
|
||||
identificador interno de la cuenta (un uuid aleatorio) para distinguir el
|
||||
primer uso del uso recurrente; <em>no</em> enviamos tu dirección de email. Sin
|
||||
píxeles publicitarios, sin seguimiento entre sitios, sin compartir nada con
|
||||
nadie. Base: tu consentimiento (art. 6.1.a RGPD y art. 22.2 de la Ley
|
||||
34/2002); puedes retirarlo cuando quieras en el banner o escribiendo a
|
||||
info@openshorts.app.</p>
|
||||
<h3>Seguridad y antiabuso</h3>
|
||||
<p>Registros del servidor, límites de uso por IP y señales de fraude,
|
||||
conservados para proteger el servicio y a sus usuarios. Base: interés legítimo
|
||||
(art. 6.1.f).</p>
|
||||
(art. 6.1.f). Los registros de aplicación se conservan como máximo 7 días en
|
||||
el log rotatorio del contenedor, no se agregan en ningún otro sitio y no
|
||||
contienen tu dirección de email.</p>
|
||||
<p>No tratamos categorías especiales de datos (art. 9 RGPD) como parte del
|
||||
servicio, no tomamos decisiones automatizadas con efectos jurídicos sobre ti
|
||||
(art. 22 RGPD) y <strong>no usamos tu contenido ni tus datos para entrenar
|
||||
modelos de IA — ni nuestros ni de terceros — ni los vendemos.</strong></p>
|
||||
|
||||
<h2>3. Cookies y almacenamiento local</h2>
|
||||
<p>El sitio no instala cookies de terceros y no muestra banner de cookies
|
||||
porque no lo necesita: todo lo que se guarda en tu navegador es estrictamente
|
||||
necesario para prestarte lo que pediste. En concreto: tu token de sesión (para
|
||||
mantenerte identificado), tus preferencias de interfaz (como los últimos
|
||||
ajustes del editor) y — si usas el modo con claves propias — tus claves API de
|
||||
proveedores de IA, que se guardan cifradas en tu propio navegador y solo se
|
||||
envían para ejecutar tus trabajos, nunca se almacenan en nuestros servidores.
|
||||
Nuestra medición de audiencia propia y autoalojada opera bajo la exención de
|
||||
consentimiento de la AEPD para analítica estrictamente estadística; los
|
||||
identificadores no viven más de 13 meses y los datos brutos no más de 25.</p>
|
||||
<p>No instalamos cookies de terceros ni cargamos ningún script de terceros al
|
||||
abrir la página. Lo que el sitio guarda se divide en dos grupos.</p>
|
||||
<p><strong>Estrictamente necesario — siempre activo, sin consentimiento.</strong>
|
||||
Todo es de primera parte y vive en el almacenamiento local de tu navegador, no
|
||||
en una cookie: tu token de sesión (te mantiene identificado), un token de
|
||||
medios de vida corta (permite que tu navegador descargue tus propios clips y
|
||||
miniaturas, que no son públicos), tus preferencias de interfaz (últimos
|
||||
ajustes del editor, pestaña, idioma), el referente de la primera visita que
|
||||
registramos una sola vez al darte de alta y — si usas el modo con claves
|
||||
propias — tus claves API de proveedores de IA. Esas claves están
|
||||
<em>ofuscadas</em>, no cifradas: el valor se transforma para que no sea
|
||||
legible de un vistazo en las herramientas de desarrollo, lo cual no es
|
||||
protección criptográfica, y quien tenga acceso a tu perfil de navegador podría
|
||||
recuperarlas. Solo se envían para ejecutar tus propios trabajos y nunca se
|
||||
almacenan en nuestros servidores. El registro de tu decisión sobre cookies
|
||||
también se guarda aquí.</p>
|
||||
<p><strong>Medición de audiencia — siempre activa, solo de primera parte.</strong>
|
||||
OpenPanel (ver apartado 2) escribe un identificador anónimo de visitante. El
|
||||
script se sirve desde este dominio; la instancia es nuestra, los datos no se
|
||||
ceden ni se usan entre sitios, lo que según el criterio de la AEPD y la CNIL la
|
||||
exime de consentimiento previo. El banner solo se muestra a visitantes del EEE,
|
||||
Reino Unido y Suiza; los identificadores no viven más de 13 meses y los datos brutos
|
||||
no más de 25. "Rechazar todo" y "Aceptar todo" están uno al lado del otro en
|
||||
el banner, y el enlace "cookies" del pie de página lo reabre para que retirar
|
||||
el consentimiento cueste lo mismo que darlo.</p>
|
||||
<p><strong>Marketing.</strong> No usamos rastreadores publicitarios ni de
|
||||
remarketing. La categoría existe en el banner para que, si algún día
|
||||
añadiéramos alguno, empiece desactivado.</p>
|
||||
|
||||
<h2>4. Quién recibe datos (encargados) y dónde</h2>
|
||||
<p>Usamos una lista corta de proveedores, cada uno vinculado por un contrato de
|
||||
encargo de tratamiento y solo para el fin indicado:</p>
|
||||
<p>Todos los proveedores que usamos, qué recibe cada uno y dónde está. La
|
||||
versión detallada de esta lista, con la garantía de transferencia de cada uno,
|
||||
se mantiene en el repositorio público en
|
||||
<a href="https://github.com/mutonby/openshorts/blob/main/docs/compliance/subprocessors.md">docs/compliance/subprocessors.md</a>,
|
||||
donde también se registran los cambios.</p>
|
||||
<ul>
|
||||
<li><strong>Google (API Gemini)</strong> — análisis con IA de la transcripción
|
||||
y fotogramas de tu vídeo para seleccionar momentos y encuadres. Las
|
||||
condiciones de la API de pago de Google prohíben usar los datos de clientes
|
||||
para entrenar modelos. EE. UU.</li>
|
||||
<li><strong>ElevenLabs</strong> — doblaje con IA, solo cuando lo solicitas.
|
||||
<li><strong>Google (API Gemini)</strong> — análisis con IA para seleccionar
|
||||
momentos, encuadres, títulos y miniaturas. Recibe la transcripción de tu vídeo
|
||||
y fotogramas muestreados (que pueden mostrar caras), la foto de referencia que
|
||||
elijas para una miniatura y — solo cuando se ejecuta la comprobación de
|
||||
encuadre "screencast" — el propio archivo de vídeo de origen, que borramos del
|
||||
almacén de archivos de Google en cuanto llega la respuesta en lugar de dejar
|
||||
que caduque allí. Las condiciones de la API de pago de Google prohíben usar
|
||||
los datos de clientes para entrenar modelos. EE. UU.</li>
|
||||
<li><strong>ElevenLabs</strong> — doblaje y voces con IA, solo cuando lo
|
||||
solicitas. Recibe el audio del clip, es decir la voz de quien habla en él.
|
||||
EE. UU.</li>
|
||||
<li><strong>fal.ai</strong> — los modelos de imagen y vídeo que hay detrás de
|
||||
AI Shorts (Flux para las imágenes de actor, Kling y Hailuo para el avatar que
|
||||
habla). Recibe la foto de actor que subes o generas — que puede ser la
|
||||
fotografía de una persona real — y el audio con el que se sincronizan sus
|
||||
labios. EE. UU.</li>
|
||||
<li><strong>Stripe</strong> — pagos y facturación. EE. UU./UE.</li>
|
||||
<li><strong>Cloudflare R2 y Amazon Web Services S3</strong> — almacenamiento de
|
||||
tus clips y archivos de proyecto. Regiones UE/EE. UU.</li>
|
||||
<li><strong>Cloudflare</strong> — DNS y CDN delante del sitio web, por lo que
|
||||
ve la dirección IP y los metadatos de petición de cada visitante.
|
||||
EE. UU./global.</li>
|
||||
<li><strong>Hetzner y Contabo</strong> — los servidores donde se ejecuta el
|
||||
servicio. Alemania.</li>
|
||||
<li><strong>Proxies de descarga (DataImpulse y proxies ISP estáticos)</strong> —
|
||||
cuando una plataforma de vídeo rechaza a nuestros servidores directamente, la
|
||||
descarga se enruta por un proxy comercial. Ve la URL del vídeo y transporta
|
||||
sus bytes; no recibe ningún dato de tu cuenta.</li>
|
||||
<li><strong>Upload-Post</strong> — publicación en las cuentas sociales que
|
||||
conectes, solo siguiendo tu instrucción. Operado por TONVI TECH SL bajo esta
|
||||
conectes, solo siguiendo tu instrucción, y custodio de los tokens de
|
||||
plataforma que esas conexiones generan. Operado por TONVI TECH SL bajo esta
|
||||
misma política.</li>
|
||||
<li><strong>Aikount</strong> — nuestro propio sistema de facturación, que
|
||||
emite la factura legal española de tu pago y por tanto recibe de Stripe tu
|
||||
nombre fiscal, dirección y email. Operado por TONVI TECH SL, servidores en
|
||||
Alemania.</li>
|
||||
<li><strong>OpenPanel</strong> — medición de audiencia propia, exenta de
|
||||
consentimiento previo (apartado 3). La instancia es nuestra y funciona en nuestros propios
|
||||
servidores en Alemania; el script se sirve desde este dominio.</li>
|
||||
<li><strong>Namecheap Private Email</strong> — entrega de los emails de
|
||||
servicio. EE. UU.</li>
|
||||
<li><strong>Google (iniciar sesión con Google)</strong> — solo si lo eliges, y
|
||||
solo con el ámbito "openid email profile", de modo que conocemos tu dirección
|
||||
y tu identificador de cuenta de Google y nada más. EE. UU.</li>
|
||||
</ul>
|
||||
<p>Dos cosas que deliberadamente <em>no</em> enviamos a ningún sitio: nuestras
|
||||
alertas operativas internas te identifican por los primeros caracteres del
|
||||
identificador de tu cuenta, nunca por tu email ni por el título de tu vídeo; y
|
||||
la detección de caras que decide dónde recortar se ejecuta en nuestros propios
|
||||
servidores y no genera ninguna plantilla biométrica.</p>
|
||||
<p>Cuando un proveedor trata datos fuera del Espacio Económico Europeo, la
|
||||
transferencia se ampara en el Marco de Privacidad de Datos UE–EE. UU. si el
|
||||
proveedor está certificado y, en todo caso, en las Cláusulas Contractuales
|
||||
|
|
@ -854,17 +1039,35 @@ más 7 días.</li>
|
|||
<li>Datos de cuenta: mientras exista tu cuenta; tras su eliminación, solo lo
|
||||
necesario para cumplir obligaciones legales o resolver disputas.</li>
|
||||
<li>Datos de facturación: 6 años (Código de Comercio).</li>
|
||||
<li>Declaraciones de derechos y registros asociados: hasta 5 años, en línea
|
||||
con el plazo de prescripción de las acciones civiles.</li>
|
||||
<li>Declaraciones de derechos: hasta 5 años junto al proyecto al que
|
||||
pertenecen, en línea con el plazo de prescripción de las acciones civiles, y
|
||||
se eliminan con tu cuenta si la borras antes.</li>
|
||||
<li>Archivos de trabajo en el servidor de procesado (la descarga de origen,
|
||||
las copias intermedias): 1 hora tras finalizar el trabajo. Subidas pendientes
|
||||
de trabajo: 6 horas.</li>
|
||||
<li>Miniaturas generadas y fotogramas muestreados para crearlas: 24 horas
|
||||
desde la última vez que descargaste una.</li>
|
||||
<li>Fotos que subes para animar un actor de IA: se eliminan con el trabajo que
|
||||
las usó, dentro de la hora siguiente.</li>
|
||||
<li>Registros de aplicación: 7 días en el log rotatorio del contenedor.</li>
|
||||
<li>Copias de seguridad cifradas de la base de datos: 30 días, pasados los
|
||||
cuales una eliminación que hayas hecho desaparece también de toda copia.</li>
|
||||
<li>Identificadores de analítica: 13 meses; datos brutos de analítica: 25
|
||||
meses.</li>
|
||||
</ul>
|
||||
<p>La versión completa y detallada de esta tabla, escrita contra el código que
|
||||
realmente la aplica, está en el repositorio público en
|
||||
<a href="https://github.com/mutonby/openshorts/blob/main/docs/compliance/retencion.md">docs/compliance/retencion.md</a>.</p>
|
||||
|
||||
<h2>6. Tus derechos</h2>
|
||||
<p>Puedes pedirnos acceso, rectificación, supresión, limitación y portabilidad
|
||||
de tus datos, y oponerte a los tratamientos basados en interés legítimo —
|
||||
basta un email a info@openshorts.app desde la dirección de tu cuenta;
|
||||
respondemos en el plazo de un mes. Para la supresión no necesitas pedírnosla:
|
||||
de tus datos, y oponerte a los tratamientos basados en interés legítimo — basta
|
||||
un email a info@openshorts.app o a info@openshorts.app desde la dirección de tu
|
||||
cuenta; respondemos en el plazo de un mes. Dos de ellos puedes ejercerlos tú
|
||||
mismo, ahora y sin pedir permiso a nadie: <strong>Cuenta → Descargar mis
|
||||
datos</strong> te entrega un fichero JSON con todo lo que nuestra base de datos
|
||||
guarda sobre ti más un enlace de descarga para cada clip de tu biblioteca
|
||||
(art. 20), y <strong>Cuenta → Eliminar cuenta</strong> lo borra (art. 17). Para la supresión no necesitas pedírnosla:
|
||||
<strong>Cuenta → Eliminar cuenta</strong> en el panel la ejecuta tú mismo, de
|
||||
forma inmediata y permanente, y se lleva por delante tus proyectos, clips,
|
||||
transcripciones, claves de API y conexiones con redes sociales, además de
|
||||
|
|
@ -911,7 +1114,24 @@ puede actuar por ti si aporta tu permiso por escrito.</p>
|
|||
|
||||
<h2>8. Edad</h2>
|
||||
<p>El servicio no está dirigido a menores. Para crear una cuenta debes tener al
|
||||
menos 16 años, o la edad de consentimiento digital de tu país si es mayor.</p>
|
||||
menos 16 años, o la edad de consentimiento digital de tu país si es mayor, y
|
||||
se te pide confirmarlo al registrarte. Si crees que un menor ha creado una
|
||||
cuenta, escribe a info@openshorts.app y la eliminaremos.</p>
|
||||
|
||||
<h2>8 bis. Contenido generado por IA</h2>
|
||||
<p>El doblaje, AI Shorts y las miniaturas con IA producen contenido sintético.
|
||||
Marcamos lo que generamos de forma legible por máquina — una etiqueta de
|
||||
metadatos en los archivos de vídeo y un marcado XMP
|
||||
<code>DigitalSourceType: trainedAlgorithmicMedia</code> en las imágenes
|
||||
generadas — conforme al art. 50.2 del Reglamento (UE) 2024/1689 (Reglamento de
|
||||
IA). Ese marcado no siempre sobrevive a la recodificación que hacen las
|
||||
plataformas al subir un archivo, así que cuando publiques contenido sintético
|
||||
eres tú quien debe activar la etiqueta de contenido de IA de la propia
|
||||
plataforma (art. 50.4); la aplicación te lo recuerda en el momento de
|
||||
publicar. Clonar una voz o animar la fotografía de una persona real sin su
|
||||
consentimiento está prohibido por los <a href="/terminos">Términos de
|
||||
Servicio</a>, y ambas funciones te piden confirmar que cuentas con ese
|
||||
consentimiento antes de ejecutarse.</p>
|
||||
|
||||
<h2>9. Cambios</h2>
|
||||
<p>Si cambiamos esta política de forma relevante te lo comunicaremos por email
|
||||
|
|
@ -928,9 +1148,8 @@ openshorts.app is:</p>
|
|||
<li><strong>Tax ID (CIF):</strong> B-19780394</li>
|
||||
<li><strong>Registered address:</strong> Calle Puerta del Mar 18, 5th floor,
|
||||
29005 Málaga, Spain</li>
|
||||
<li><strong>Registry:</strong> registered with the Mercantile Registry of
|
||||
Málaga</li>
|
||||
<li><strong>Contact:</strong> info@openshorts.app</li>
|
||||
<li><strong>Contact:</strong> info@openshorts.app (general and legal notices)
|
||||
and info@openshorts.app (data protection)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Purpose of the site</h2>
|
||||
|
|
@ -970,8 +1189,8 @@ openshorts.app es:</p>
|
|||
<li><strong>CIF:</strong> B-19780394</li>
|
||||
<li><strong>Domicilio:</strong> Calle Puerta del Mar 18, 5ª planta, 29005
|
||||
Málaga, España</li>
|
||||
<li><strong>Registro:</strong> inscrita en el Registro Mercantil de Málaga</li>
|
||||
<li><strong>Contacto:</strong> info@openshorts.app</li>
|
||||
<li><strong>Contacto:</strong> info@openshorts.app (general y avisos legales)
|
||||
y info@openshorts.app (protección de datos)</li>
|
||||
</ul>
|
||||
|
||||
<h2>Objeto del sitio</h2>
|
||||
|
|
@ -1255,14 +1474,14 @@ export function legalPages() {
|
|||
path: '/privacy',
|
||||
title: 'Privacy Policy | OpenShorts',
|
||||
description:
|
||||
'What OpenShorts stores (email, billing reference, the videos you process), for how long, which providers touch it, and your GDPR rights. No third-party trackers.',
|
||||
'What OpenShorts stores (email, billing reference, the videos you process), for how long, which providers touch it, and your GDPR rights. Nothing non-essential loads before you accept it.',
|
||||
h1: 'Privacy Policy',
|
||||
breadcrumb: [{ name: 'Privacy Policy' }],
|
||||
published: PUBLISHED,
|
||||
updated: PUBLISHED,
|
||||
tldr: [
|
||||
'We store your email, your billing reference and the videos you process — nothing beyond what the service needs.',
|
||||
'No third-party trackers and no cookie banner: analytics is self-hosted and first-party, and BYOK API keys live encrypted in your own browser.',
|
||||
'No advertising trackers: audience measurement is first-party, served from our own domain, and stays off until you accept it in the banner. BYOK API keys are obfuscated in your own browser and never reach our servers.',
|
||||
'Your content is never used to train AI models. Free-plan clips are deleted after 7 days.',
|
||||
],
|
||||
body: PRIVACY_EN,
|
||||
|
|
@ -1310,7 +1529,7 @@ export function legalPages() {
|
|||
lang: 'es',
|
||||
tldr: [
|
||||
'Guardamos tu email, tu referencia de facturación y los vídeos que procesas — nada más de lo que el servicio necesita.',
|
||||
'Sin rastreadores de terceros y sin banner de cookies: la analítica es propia y autoalojada, y las claves BYOK viven cifradas en tu propio navegador.',
|
||||
'Sin rastreadores publicitarios: la medición de audiencia es propia, se sirve desde nuestro dominio y no se activa hasta que la aceptas en el banner. Las claves BYOK viven ofuscadas en tu navegador y nunca llegan a nuestros servidores.',
|
||||
'Tu contenido nunca se usa para entrenar modelos de IA. Los clips del plan gratuito se eliminan a los 7 días.',
|
||||
],
|
||||
body: PRIVACY_ES,
|
||||
|
|
|
|||
|
|
@ -245,9 +245,7 @@ ${page.noindex ? '' : `<link rel="canonical" href="${canonical}">\n`}<meta name=
|
|||
page.noindex ? 'noindex,follow' : 'index,follow,max-image-preview:large,max-snippet:-1'
|
||||
}">
|
||||
<link rel="icon" type="image/png" href="/logo-openshorts.png">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Instrument+Serif&family=Geist:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/fonts.css">
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="og:url" content="${canonical}">
|
||||
<meta property="og:title" content="${esc(page.title)}">
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import { ArrowLeft, FileText, Shield, Landmark, Flag, RotateCcw } from 'lucide-r
|
|||
// versions). This in-app view is a hub with the plain-language summary and
|
||||
// links, so the SPA route (#legal) and the crawlable pages never drift: the
|
||||
// full text lives in exactly one place.
|
||||
const LAST_UPDATED = '2026-08-29';
|
||||
const LAST_UPDATED = '2026-09-04';
|
||||
const SUPPORT_EMAIL = 'info@openshorts.app';
|
||||
|
||||
const DOCS = [
|
||||
|
|
@ -20,7 +20,7 @@ const DOCS = [
|
|||
{
|
||||
icon: Shield,
|
||||
title: 'Privacy Policy',
|
||||
desc: 'What we store, for how long, which providers touch it, and your GDPR rights. No third-party trackers.',
|
||||
desc: 'What we store, for how long, which providers touch it, and your GDPR rights. Nothing non-essential loads until you accept it.',
|
||||
href: '/privacy',
|
||||
es: '/privacidad',
|
||||
},
|
||||
|
|
@ -71,7 +71,7 @@ export default function Legal() {
|
|||
<ul className="list-disc pl-6 space-y-2">
|
||||
<li><strong className="text-ink">Your videos and clips are yours.</strong> We never use your content to train AI models.</li>
|
||||
<li><strong className="text-ink">You must have the rights</strong> to every video you upload or link, and you are the publisher of what you post.</li>
|
||||
<li><strong className="text-ink">No third-party trackers.</strong> Analytics is self-hosted; free-plan clips are deleted after 7 days.</li>
|
||||
<li><strong className="text-ink">No advertising trackers.</strong> Audience measurement is first-party and stays off until you accept it; free-plan clips are deleted after 7 days.</li>
|
||||
<li><strong className="text-ink">Cancel anytime</strong> from your account. Charged in the last 14 days and never used it? Full refund. EU consumers keep their 14-day withdrawal right on top of that.</li>
|
||||
<li><strong className="text-ink">Delete everything anytime.</strong> Account → Delete account erases your projects, clips and keys on the spot. No email to us, no waiting.</li>
|
||||
</ul>
|
||||
|
|
|
|||
131
dashboard/src/components/CookieBanner.jsx
Normal file
131
dashboard/src/components/CookieBanner.jsx
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
// The consent banner. Small on purpose — it is a legal control, not a feature.
|
||||
//
|
||||
// Two rules it exists to satisfy, both of which the previous "no banner at all"
|
||||
// version failed once OpenPanel was identifying users by profile:
|
||||
// 1. Nothing non-essential runs before the visitor agrees (see lib/consent.js —
|
||||
// the tracker is only loaded from there).
|
||||
// 2. Refusing must cost exactly as much as accepting. "Reject all" and
|
||||
// "Accept all" are the same component with the same size, weight, colour
|
||||
// and position; there is no pre-ticked box and no dark pattern.
|
||||
//
|
||||
// It renders nothing once a decision exists — the footer link
|
||||
// (openConsentManager) is how anyone changes their mind.
|
||||
import { useEffect, useState } from 'react';
|
||||
import {
|
||||
getConsent, hasDecided, acceptAll, rejectAll, setConsent,
|
||||
onConsentOpenRequest,
|
||||
} from '../lib/consent';
|
||||
|
||||
const CATEGORY_COPY = [
|
||||
{
|
||||
key: 'necessary',
|
||||
label: 'Strictly necessary',
|
||||
body: 'Your sign-in session, the token that lets your browser fetch your own clips, and your interface preferences. Stored in this browser only. Cannot be switched off — without them you cannot sign in.',
|
||||
locked: true,
|
||||
},
|
||||
{
|
||||
key: 'analytics',
|
||||
label: 'Audience measurement',
|
||||
body: 'Anonymous page and feature counters through OpenPanel, a self-hosted instance run by us. First-party only: no advertising network, no data sold, no profile shared with anyone, no cross-site tracking. Exempt from prior consent, always on.',
|
||||
locked: true,
|
||||
},
|
||||
{
|
||||
key: 'marketing',
|
||||
label: 'Marketing',
|
||||
body: 'Advertising and remarketing trackers. We do not use any today; this switch exists so that if we ever add one, it starts off.',
|
||||
},
|
||||
];
|
||||
|
||||
export default function CookieBanner() {
|
||||
const [open, setOpen] = useState(() => !hasDecided());
|
||||
const [details, setDetails] = useState(false);
|
||||
const [draft, setDraft] = useState(() => getConsent());
|
||||
|
||||
useEffect(() => onConsentOpenRequest(() => {
|
||||
setDraft(getConsent());
|
||||
setDetails(true);
|
||||
setOpen(true);
|
||||
}), []);
|
||||
|
||||
if (!open) return null;
|
||||
|
||||
const close = () => { setOpen(false); setDetails(false); };
|
||||
|
||||
return (
|
||||
<div
|
||||
role="dialog"
|
||||
aria-modal="false"
|
||||
aria-label="Cookie and tracker preferences"
|
||||
className="fixed inset-x-0 bottom-0 z-50 p-3 sm:p-4 pb-[max(0.75rem,env(safe-area-inset-bottom))]"
|
||||
>
|
||||
<div className="card mx-auto max-w-3xl p-4 sm:p-5 space-y-4 shadow-2xl">
|
||||
<div className="space-y-2">
|
||||
<h2 className="font-display lowercase text-lg text-ink">Before we count anything</h2>
|
||||
<p className="text-sm text-ink2">
|
||||
We only store what the app needs to work unless you tell us otherwise.
|
||||
Audience measurement stays off until you say yes, and you can change
|
||||
this at any time from the “cookies” link in the footer.{' '}
|
||||
<a href="#legal" className="underline hover:text-ink">Privacy policy</a>.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{details && (
|
||||
<ul className="space-y-3 border-t border-rule pt-3">
|
||||
{CATEGORY_COPY.map((cat) => (
|
||||
<li key={cat.key} className="flex gap-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
id={`consent-${cat.key}`}
|
||||
className="mt-1 h-4 w-4 shrink-0 accent-current"
|
||||
checked={cat.locked ? true : !!draft[cat.key]}
|
||||
disabled={cat.locked}
|
||||
onChange={(e) => setDraft({ ...draft, [cat.key]: e.target.checked })}
|
||||
/>
|
||||
<label htmlFor={`consent-${cat.key}`} className="text-sm">
|
||||
<span className="text-ink">{cat.label}</span>
|
||||
{cat.locked && <span className="text-muted"> · always on</span>}
|
||||
<span className="block text-muted">{cat.body}</span>
|
||||
</label>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
)}
|
||||
|
||||
<div className="flex flex-col sm:flex-row gap-2 sm:items-center">
|
||||
{/* Reject and Accept are deliberately the same button. */}
|
||||
<button
|
||||
type="button"
|
||||
className="btn-ghost flex-1"
|
||||
onClick={() => { rejectAll(); close(); }}
|
||||
>
|
||||
Reject all
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
className="btn-ghost flex-1"
|
||||
onClick={() => { acceptAll(); close(); }}
|
||||
>
|
||||
Accept all
|
||||
</button>
|
||||
{details ? (
|
||||
<button
|
||||
type="button"
|
||||
className="btn-quiet sm:w-auto"
|
||||
onClick={() => { setConsent(draft); close(); }}
|
||||
>
|
||||
Save my choice
|
||||
</button>
|
||||
) : (
|
||||
<button
|
||||
type="button"
|
||||
className="btn-quiet sm:w-auto"
|
||||
onClick={() => setDetails(true)}
|
||||
>
|
||||
Choose
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
/* Hallmark · genre: atmospheric · theme: lumen (night foundry) · design-system: design.md · designed-as-app */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@700&display=swap'); /* hook-overlay font burned into videos — not UI */
|
||||
/* Noto Serif (hook-overlay font, burned into videos — not UI) is self-hosted
|
||||
with the rest of the faces in public/fonts.css: no request to Google. */
|
||||
@import './tokens.css';
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import { allows } from './consent';
|
||||
|
||||
// Lightweight custom-event helper (OpenPanel).
|
||||
//
|
||||
// The hosted openshorts.app build loads OpenPanel (see index.html), which
|
||||
|
|
@ -28,6 +30,9 @@
|
|||
// Prices ride along as ordinary props (e.g. value_usd) for breakdowns.
|
||||
export function track(event, options) {
|
||||
try {
|
||||
// `op` is a queueing stub until consent loads op1.js, so a call made before
|
||||
// the visitor accepted would be flushed the moment they did. Check first.
|
||||
if (!allows('analytics')) return;
|
||||
if (typeof window !== 'undefined' && typeof window.op === 'function') {
|
||||
window.op('track', event, (options && options.props) || {});
|
||||
}
|
||||
|
|
@ -45,9 +50,16 @@ export function track(event, options) {
|
|||
*/
|
||||
export function identify(user, props) {
|
||||
try {
|
||||
if (!allows('analytics')) return;
|
||||
if (!user || !user.id) return;
|
||||
if (typeof window !== 'undefined' && typeof window.op === 'function') {
|
||||
window.op('identify', { profileId: String(user.id), email: user.email, ...(props || {}) });
|
||||
// profileId only. The email used to ride along here, which put a direct
|
||||
// identifier of every signed-in user into the analytics store and made
|
||||
// both the privacy policy ("no third-party trackers", "aggregate
|
||||
// measurement") and the deletion notice ("OpenPanel never received the
|
||||
// address") untrue. The uuid is enough to join a sale to a first visit,
|
||||
// and it is the same id the server-side events already use.
|
||||
window.op('identify', { profileId: String(user.id), ...(props || {}) });
|
||||
}
|
||||
} catch (_) {
|
||||
/* analytics must never throw into the app */
|
||||
|
|
|
|||
161
dashboard/src/lib/consent.js
Normal file
161
dashboard/src/lib/consent.js
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
// Cookie / tracker consent — our own, in this repo, no vendor CMP.
|
||||
//
|
||||
// The rule the previous version broke is LSSI art. 22.2 (and GDPR art. 6): a
|
||||
// tracker may not run before the visitor has agreed to it. OpenPanel's op1.js
|
||||
// used to be injected from the static <head> on every page load, so by the time
|
||||
// anyone could have been asked, the request had already gone out.
|
||||
//
|
||||
// So the loading of every non-essential script now goes through here:
|
||||
// index.html only *publishes* window.__osAnalyticsInit; nothing calls it until
|
||||
// `analytics` is granted. Withdrawing consent is as easy as giving it (the
|
||||
// banner's two buttons are the same size and weight, and the footer link
|
||||
// reopens it), and because a script cannot be unloaded, revoking analytics
|
||||
// reloads the page so the tracker is genuinely gone.
|
||||
//
|
||||
// Categories:
|
||||
// necessary — always on, never asked about: the session JWT, the media
|
||||
// token, the UI preferences. All first-party, all localStorage.
|
||||
// analytics — OpenPanel (self-hosted script + TONVI's own instance).
|
||||
// marketing — nothing uses it today. It exists so that adding a pixel is a
|
||||
// decision someone has to make here, in the open, rather than a
|
||||
// <script> tag someone drops into index.html.
|
||||
|
||||
const STORAGE_KEY = 'openshorts_consent';
|
||||
const VERSION = 1;
|
||||
|
||||
export const CATEGORIES = ['necessary', 'analytics', 'marketing'];
|
||||
|
||||
const DENY_ALL = { necessary: true, analytics: false, marketing: false };
|
||||
const GRANT_ALL = { necessary: true, analytics: true, marketing: true };
|
||||
|
||||
/* Geo-gating: el banner solo se debe a visitantes en EEE, Reino Unido y Suiza.
|
||||
* Fuera de ahí, consentimiento implícito y sin banner. País: traza de
|
||||
* Cloudflare (cacheada, se refina en segundo plano); mientras tanto decide la
|
||||
* zona horaria; si tampoco se sabe, se asume Europa. */
|
||||
const EEA_COUNTRIES = ["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB","CH"];
|
||||
const EEA_TZ_EXTRA = ["Atlantic/Canary","Atlantic/Madeira","Atlantic/Azores","Atlantic/Reykjavik","Atlantic/Faroe","Arctic/Longyearbyen"];
|
||||
const GEO_KEY = "up_geo_cc";
|
||||
|
||||
export function isEEAVisitor() {
|
||||
if (typeof window === "undefined") return true;
|
||||
try {
|
||||
const cc = window.localStorage.getItem(GEO_KEY);
|
||||
if (cc && /^[A-Z]{2}$/.test(cc)) return EEA_COUNTRIES.indexOf(cc) !== -1;
|
||||
} catch (e) { /* storage bloqueado */ }
|
||||
try {
|
||||
const tz = Intl.DateTimeFormat().resolvedOptions().timeZone || "";
|
||||
if (tz.indexOf("Europe/") === 0 || EEA_TZ_EXTRA.indexOf(tz) !== -1) return true;
|
||||
if (tz) return false;
|
||||
} catch (e) { /* sin Intl */ }
|
||||
return true;
|
||||
}
|
||||
|
||||
export function refineGeo() {
|
||||
if (typeof window === "undefined" || typeof window.fetch !== "function") return;
|
||||
try { if (window.localStorage.getItem(GEO_KEY)) return; } catch (e) {}
|
||||
fetch("/cdn-cgi/trace", { cache: "no-store" })
|
||||
.then((r) => (r.ok ? r.text() : ""))
|
||||
.then((t) => {
|
||||
const m = /^loc=([A-Z]{2})$/m.exec(t || "");
|
||||
if (m) { try { window.localStorage.setItem(GEO_KEY, m[1]); } catch (e) {} }
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
|
||||
const listeners = new Set();
|
||||
|
||||
const read = () => {
|
||||
try {
|
||||
const raw = localStorage.getItem(STORAGE_KEY);
|
||||
if (!raw) return null;
|
||||
const parsed = JSON.parse(raw);
|
||||
if (!parsed || parsed.v !== VERSION) return null; // re-ask on a policy change
|
||||
return parsed;
|
||||
} catch (_) {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
/** The stored decision, or null when the visitor has never been asked. */
|
||||
export const getConsentRecord = () => read();
|
||||
|
||||
/** Effective permissions. Nothing but `necessary` before a decision exists. */
|
||||
export const getConsent = () => {
|
||||
const stored = read();
|
||||
if (!stored) return isEEAVisitor() ? { ...DENY_ALL, analytics: true } : { ...GRANT_ALL };
|
||||
return {
|
||||
necessary: true,
|
||||
// Self-hosted OpenPanel is first-party audience measurement, exempt from
|
||||
// prior consent (AEPD/CNIL criteria): always on.
|
||||
analytics: true,
|
||||
marketing: !!stored.marketing,
|
||||
};
|
||||
};
|
||||
|
||||
export const hasDecided = () => read() !== null || !isEEAVisitor();
|
||||
|
||||
export const allows = (category) => !!getConsent()[category];
|
||||
|
||||
export function onConsentChange(fn) {
|
||||
listeners.add(fn);
|
||||
return () => listeners.delete(fn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Persist a decision and act on it immediately.
|
||||
*
|
||||
* Granting analytics boots the tracker in place. Revoking it reloads: op1.js
|
||||
* has already attached listeners and there is no honest way to unload a script
|
||||
* from a live page, so the only truthful implementation of "stop" is a fresh
|
||||
* document that never loads it.
|
||||
*/
|
||||
export function setConsent(choice) {
|
||||
const before = getConsent();
|
||||
const next = {
|
||||
v: VERSION,
|
||||
ts: new Date().toISOString(),
|
||||
necessary: true,
|
||||
analytics: !!choice.analytics,
|
||||
marketing: !!choice.marketing,
|
||||
};
|
||||
try {
|
||||
localStorage.setItem(STORAGE_KEY, JSON.stringify(next));
|
||||
} catch (_) { /* private mode: the decision holds for this page at least */ }
|
||||
|
||||
listeners.forEach((fn) => { try { fn(getConsent()); } catch (_) { /* ignore */ } });
|
||||
|
||||
if (next.analytics && !before.analytics) {
|
||||
applyConsent();
|
||||
} else if (!next.analytics && before.analytics) {
|
||||
try { window.op && window.op('clear'); } catch (_) { /* ignore */ }
|
||||
try { window.location.reload(); } catch (_) { /* ignore */ }
|
||||
}
|
||||
return getConsent();
|
||||
}
|
||||
|
||||
export const acceptAll = () => setConsent({ analytics: true, marketing: true });
|
||||
export const rejectAll = () => setConsent({ analytics: false, marketing: false });
|
||||
|
||||
/** Start whatever the stored decision allows. Called once at boot. */
|
||||
export function applyConsent() {
|
||||
refineGeo();
|
||||
try {
|
||||
return typeof window.__osAnalyticsInit === 'function'
|
||||
? window.__osAnalyticsInit()
|
||||
: false;
|
||||
} catch (_) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Reopening the banner from anywhere (the footer link) without threading props
|
||||
// through the whole tree.
|
||||
const OPEN_EVENT = 'openshorts:consent-open';
|
||||
export const openConsentManager = () => {
|
||||
try { window.dispatchEvent(new CustomEvent(OPEN_EVENT)); } catch (_) { /* ignore */ }
|
||||
};
|
||||
export const onConsentOpenRequest = (fn) => {
|
||||
window.addEventListener(OPEN_EVENT, fn);
|
||||
return () => window.removeEventListener(OPEN_EVENT, fn);
|
||||
};
|
||||
|
|
@ -7,6 +7,8 @@ import { capture as captureAttribution } from './lib/attribution'
|
|||
import PricingPage from './components/PricingPage'
|
||||
import AccountPage from './components/AccountPage'
|
||||
import LoginModal from './components/LoginModal'
|
||||
import { applyConsent } from './lib/consent'
|
||||
import CookieBanner from './components/CookieBanner'
|
||||
|
||||
const App = lazy(() => import('./App.jsx'))
|
||||
const Legal = lazy(() => import('./Legal.jsx'))
|
||||
|
|
@ -113,12 +115,17 @@ function Root() {
|
|||
// would destroy the referrer and any UTM params we still need to read.
|
||||
captureAttribution();
|
||||
|
||||
// Start whatever the visitor previously agreed to. Nothing at all on a first
|
||||
// visit: index.html only publishes the analytics initialiser, it never runs it.
|
||||
applyConsent();
|
||||
|
||||
createRoot(document.getElementById('root')).render(
|
||||
<StrictMode>
|
||||
<AuthProvider>
|
||||
<Suspense fallback={<div className="min-h-screen bg-paper flex items-center justify-center text-muted text-sm lowercase">loading…</div>}>
|
||||
<Root />
|
||||
</Suspense>
|
||||
<CookieBanner />
|
||||
</AuthProvider>
|
||||
</StrictMode>,
|
||||
)
|
||||
|
|
|
|||
94
docs/compliance/retencion.md
Normal file
94
docs/compliance/retencion.md
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
# Plazos de conservación reales
|
||||
|
||||
**OpenShorts Cloud (openshorts.app) · TONVI TECH SL, B-19780394 · versión de 4 de septiembre de 2026**
|
||||
|
||||
Esta tabla es la versión larga del apartado 5 de la
|
||||
[política de privacidad](https://www.openshorts.app/privacidad). Cada fila
|
||||
nombra **el código que aplica el plazo**, porque un plazo que no está en el
|
||||
código no es un plazo: es una intención. Si cambias una constante, cambia esta
|
||||
tabla y la política en el mismo commit.
|
||||
|
||||
Las variables de entorno permiten acortar los plazos en un despliegue, nunca
|
||||
alargarlos por encima de lo que dice la política sin actualizarla.
|
||||
|
||||
---
|
||||
|
||||
## 1. Archivos de trabajo en el servidor de procesado
|
||||
|
||||
| Qué | Plazo | Dónde se aplica |
|
||||
|---|---|---|
|
||||
| Directorio del trabajo (`output/<job_id>`): vídeo de origen descargado, clips renderizados, checkpoint de transcripción, sidecars | **1 h** desde la última escritura | `app.cleanup_jobs`, `JOB_RETENTION_SECONDS` (3600 en cloud; 86400 en autoalojado) |
|
||||
| Descarga de origen conservada de un trabajo por URL | Igual que el trabajo, o antes si se configura | `app._sweep_retained_sources`, `SOURCE_RETENTION_SECONDS` |
|
||||
| Subidas pendientes de trabajo (huecos de subida para agentes) | **6 h** | `app._sweep_pending_uploads`, `UPLOAD_TTL_SECONDS` |
|
||||
| Ficheros en `uploads/` | **1 h** (misma vuelta del barrido) | `app.cleanup_jobs` |
|
||||
| **Miniaturas generadas y fotogramas muestreados** (`output/thumbnails/<sesión>`) — recortes de la cara del presentador | **24 h desde la última descarga**; servir un fichero reinicia el reloj | `app._sweep_thumbnail_sessions`, `THUMBNAIL_RETENTION_SECONDS` |
|
||||
| **Fotos de actor subidas** (`output/actor_uploads/*.png`) — fotografías de personas | **1 h** (el reloj del trabajo) | `app._sweep_actor_uploads`, `ACTOR_UPLOAD_RETENTION_SECONDS` |
|
||||
| Tope de disco: se purgan los trabajos más antiguos por encima del límite | Inmediato al superarlo | `app._enforce_output_size_cap`, `OUTPUT_MAX_GB` |
|
||||
|
||||
Antes del 4-sep-2026 las dos filas en negrita **no tenían ningún plazo**: el
|
||||
barrido horario salta deliberadamente `output/thumbnails`, y `actor_uploads`
|
||||
solo desaparecía cuando el directorio entero envejecía como si fuese un
|
||||
trabajo, es decir una hora después de la *última* subida de cualquier usuario.
|
||||
|
||||
## 2. Contenido del usuario en almacenamiento durable (Cloudflare R2)
|
||||
|
||||
| Qué | Plazo | Dónde se aplica |
|
||||
|---|---|---|
|
||||
| Clips del plan gratuito | **7 días**, con aviso por email el día anterior | `cloud/videos.py`, `FREE_CLIP_RETENTION_DAYS` |
|
||||
| Clips y proyectos de plan de pago | Mientras la suscripción esté activa **+ 7 días** de gracia | `cloud/videos.py`, `VIDEO_RETENTION_GRACE_DAYS` |
|
||||
| Metadatos de proyecto (incluye la transcripción) | Igual que los clips del mismo trabajo | `cloud/videos.archive_job` |
|
||||
| Todo lo anterior, si el usuario borra la cuenta | **Inmediato** (purga por prefijo antes de tocar la base de datos) | `cloud/account.py` |
|
||||
|
||||
## 3. Base de datos (PostgreSQL)
|
||||
|
||||
| Qué | Plazo | Dónde se aplica |
|
||||
|---|---|---|
|
||||
| `users`, `subscriptions`, `credit_topups`, `usage_ledger`, `projects`, `user_videos`, `api_keys`, `upload_post_profiles`, `signup_attribution`, `oauth_codes`, `clip_expiry_warnings` | Mientras exista la cuenta; **inmediato** al borrarla | `cloud/account.USER_OWNED_TABLES` |
|
||||
| `magic_link_tokens` (incluye la IP que pidió el enlace) | **30 días** | `cloud/auth.py` |
|
||||
| **Declaración de derechos** (IP truncada a /24, user-agent, fecha, origen) | Con el proyecto al que pertenece → hasta 5 años, y se borra con la cuenta | `app.py` (captura) → `cloud/videos.archive_job` → `Project.state.rights_attestation` |
|
||||
| `account_deletions` (sha256 del email, sin la dirección) | **5 años** | `DELETION_LOG_RETENTION_DAYS` |
|
||||
| `stripe_events` (deduplicación de webhooks) | Mientras dure la retención de eventos de Stripe; sin datos personales | `cloud/billing.py` |
|
||||
| `proxy_usage` (host de la URL, id de trabajo; **sin usuario**) | Contabilidad de costes; sin datos personales | `cloud/proxy_ledger.py` |
|
||||
|
||||
## 4. Navegador del usuario (localStorage, nunca cookies de terceros)
|
||||
|
||||
| Qué | Plazo | Dónde |
|
||||
|---|---|---|
|
||||
| Token de sesión (JWT) | 30 días o hasta cerrar sesión | `dashboard/src/lib/api.js` |
|
||||
| Token de medios (para descargar tus propios clips) | 12 h, se renueva solo | `dashboard/src/lib/mediaToken.js`, `MEDIA_TOKEN_TTL_SECONDS` |
|
||||
| Decisión sobre cookies | Hasta que la cambies, o hasta que cambie la versión del banner | `dashboard/src/lib/consent.js` |
|
||||
| Preferencias de interfaz, atribución de primera visita | Hasta que borres los datos del sitio | `dashboard/src/lib/attribution.js` |
|
||||
| Claves BYOK de proveedores de IA | Hasta que las borres. **Ofuscadas, no cifradas** | `dashboard/src/App.jsx` |
|
||||
|
||||
## 5. Registros, alertas y copias
|
||||
|
||||
| Qué | Plazo | Nota |
|
||||
|---|---|---|
|
||||
| Log de aplicación (stdout del contenedor) | **7 días** en el log rotatorio de Docker | Requiere `max-size`/`max-file` en el runtime — ver "pendiente" abajo |
|
||||
| Alertas operativas a Telegram | Las conserva Telegram | **No contienen email ni título de vídeo** desde el 4-sep-2026: identifican al usuario por los 8 primeros caracteres de su uuid (`cloud/alerts.user_ref`) |
|
||||
| Copias de seguridad cifradas de PostgreSQL | **30 días** | `ops/pg_backup.sh` — la política promete que una supresión desaparece de toda copia en 30 días, y esto es lo único que lo hace cierto |
|
||||
| Analítica (OpenPanel, solo con consentimiento) | Identificadores 13 meses; datos brutos 25 meses | Instancia propia |
|
||||
|
||||
## 6. Lo que sobrevive deliberadamente a una supresión de cuenta
|
||||
|
||||
| Qué | Plazo | Por qué |
|
||||
|---|---|---|
|
||||
| Cliente y facturas en Stripe | **6 años** | Art. 30 Código de Comercio |
|
||||
| Una fila en `account_deletions` con `sha256(email)` | **5 años** | Art. 5.2 RGPD: poder probar que la supresión ocurrió sin conservar la identidad |
|
||||
|
||||
---
|
||||
|
||||
## Pendiente (no se puede hacer desde el repositorio)
|
||||
|
||||
- **Rotación del log del contenedor**: fijar `max-size=50m`, `max-file=3` (o el
|
||||
equivalente en Coolify) en el runtime del contenedor de la API. La fila de 7
|
||||
días de arriba describe la intención; hasta que esté configurado el plazo real
|
||||
depende del demonio de Docker del host.
|
||||
- **Programar `ops/pg_backup.sh`** en el host de la base de datos y hacer **una
|
||||
restauración de prueba**.
|
||||
- **Retención en OpenPanel**: confirmar en la instancia
|
||||
(`openpanel.fotoexamen.com`) que los perfiles caducan a 13 meses y los eventos
|
||||
a 25, y borrar el perfil por `profileId` cuando llega el evento
|
||||
`AccountDeleted`.
|
||||
- **Purga de cuentas gratuitas inactivas** (p. ej. 24 meses sin acceso, con
|
||||
aviso previo): decidida como política, todavía no implementada.
|
||||
90
docs/compliance/subprocessors.md
Normal file
90
docs/compliance/subprocessors.md
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
# Subencargados de tratamiento — OpenShorts Cloud
|
||||
|
||||
**Responsable:** TONVI TECH SL · NIF B-19780394 · Calle Puerta del Mar 18, 5º,
|
||||
29005 Málaga (España) · info@openshorts.app · info@openshorts.app
|
||||
**Versión:** 4 de septiembre de 2026 · **Anterior:** — (primera versión)
|
||||
|
||||
Lista nominal de todos los terceros que tratan datos personales por cuenta de
|
||||
TONVI TECH SL al prestar OpenShorts Cloud, con qué recibe cada uno, dónde está
|
||||
y qué garantiza la transferencia cuando sale del EEE (arts. 28 y 44-49 RGPD).
|
||||
Es la versión de referencia del apartado 4 de la
|
||||
[política de privacidad](https://www.openshorts.app/privacidad).
|
||||
|
||||
Los cambios se anotan al final. Un cliente B2B que quiera aviso previo de altas
|
||||
puede pedirlo en info@openshorts.app.
|
||||
|
||||
---
|
||||
|
||||
## 1. Procesado de vídeo e IA
|
||||
|
||||
| Proveedor | Entidad y país | Qué recibe | Garantía de transferencia | DPA |
|
||||
|---|---|---|---|---|
|
||||
| **Google (Gemini API)** | Google LLC / Google Ireland Ltd. — EE. UU. | Transcripción, fotogramas muestreados (pueden incluir caras), foto de referencia del presentador para miniaturas, y el **archivo de vídeo completo** solo en la comprobación de encuadre "screencast" (se borra del File API en cuanto responde) | EU-US Data Privacy Framework (Google LLC certificado) + CCT | Google Cloud / AI Studio paid data terms — **verificar que la clave gestionada pertenece a un proyecto de pago**: los términos gratuitos permiten entrenamiento |
|
||||
| **ElevenLabs** | ElevenLabs Inc. — EE. UU. | Audio del clip para doblaje (voz de personas reales), texto para TTS | DPF (certificado) + CCT | Pendiente de firma/archivo |
|
||||
| **fal.ai** | Features & Labels, Inc. — EE. UU. | Foto del actor (puede ser de una persona real), audio a sincronizar, vídeo generado. Modelos: Flux 2 Pro, Kling AI-Avatar, Hailuo | **Sin certificación DPF conocida → CCT obligatorias** | Pendiente de firma/archivo |
|
||||
|
||||
## 2. Infraestructura y almacenamiento
|
||||
|
||||
| Proveedor | Entidad y país | Qué recibe | Garantía | DPA |
|
||||
|---|---|---|---|---|
|
||||
| **Hetzner Online GmbH** | Alemania | Servidores de la API y base de datos | Dentro del EEE | DPA estándar de Hetzner |
|
||||
| **Contabo GmbH** | Alemania | Servidores | Dentro del EEE | DPA estándar de Contabo |
|
||||
| **Cloudflare R2** | Cloudflare, Inc. — EE. UU. / región UE del bucket | Clips, metadatos de proyecto (incluida la transcripción), copias de seguridad | DPF + CCT (Cloudflare Customer DPA) | Automático con la cuenta — **verificar que el bucket está en jurisdicción UE** |
|
||||
| **Cloudflare (DNS + CDN)** | Cloudflare, Inc. — EE. UU. / global | IP y metadatos de petición de cada visitante del sitio | DPF + CCT | Cloudflare Customer DPA |
|
||||
| **Amazon Web Services (S3)** | AWS EMEA SARL — región `eu-west-3` (París) | Galería pública UGC e imágenes de actor, solo si el usuario opta por publicar | Dentro del EEE (región UE) | AWS Service Terms / DPA |
|
||||
|
||||
## 3. Pagos, facturación y correo
|
||||
|
||||
| Proveedor | Entidad y país | Qué recibe | Garantía | DPA |
|
||||
|---|---|---|---|---|
|
||||
| **Stripe** | Stripe Payments Europe Ltd. (Irlanda) / Stripe, Inc. (EE. UU.) | Email, nombre y dirección fiscal, datos de tarjeta (nunca pasan por nuestros servidores), historial de pagos | DPF + CCT | Incluido en el Stripe Services Agreement |
|
||||
| **Aikount** (sistema propio de facturación) | TONVI TECH SL — servidores en Alemania | `stripe_customer_id`, nombre fiscal, email y dirección importados de Stripe para emitir la factura legal española | Dentro del EEE; **mismo responsable**, no es un tercero | Sistema interno |
|
||||
| **Namecheap Private Email** | Namecheap, Inc. — EE. UU. | Dirección de email y contenido de los mensajes de servicio | **Sin certificación DPF conocida → CCT obligatorias** | Pendiente de firma/archivo |
|
||||
|
||||
## 4. Distribución y analítica
|
||||
|
||||
| Proveedor | Entidad y país | Qué recibe | Garantía | DPA |
|
||||
|---|---|---|---|---|
|
||||
| **Upload-Post** | TONVI TECH SL | Publicación en las redes que el usuario conecta; **custodia los tokens OAuth** de TikTok/YouTube/Instagram (OpenShorts no almacena ninguno, solo el nombre de perfil) | Mismo responsable | Sistema interno — su política debe cubrir esta custodia |
|
||||
| **OpenPanel** (instancia propia) | TONVI TECH SL — servidores en Alemania | Eventos de uso con el uuid de la cuenta como `profileId`. **Nunca el email** (retirado del `identify` del navegador el 4-sep-2026). Solo tras consentimiento | Dentro del EEE; script servido desde el propio dominio | Sistema interno |
|
||||
| **Google (iniciar sesión con Google)** | Google Ireland Ltd. / Google LLC | Solo el ámbito `openid email profile`: dirección e identificador de cuenta | DPF + CCT | Google Terms |
|
||||
|
||||
## 5. Descarga de vídeo (proxies)
|
||||
|
||||
| Proveedor | País | Qué recibe | Garantía |
|
||||
|---|---|---|---|
|
||||
| **DataImpulse** (proxy residencial por GB) | ❓ **verificar sede y términos** | La URL del vídeo y sus bytes. Ningún dato de cuenta | CCT si está fuera del EEE |
|
||||
| **Proxies ISP estáticos** (proveedor por confirmar) | ❓ **verificar** | Igual | CCT si está fuera del EEE |
|
||||
|
||||
## 6. Terceros que YA NO reciben datos
|
||||
|
||||
| Proveedor | Qué recibía | Retirado |
|
||||
|---|---|---|
|
||||
| **Google Fonts** (`fonts.googleapis.com`, `fonts.gstatic.com`) | La IP de cada visitante, en cada carga de página, sin consentimiento y sin base jurídica | 4-sep-2026 — las tipografías se sirven desde el propio dominio (`dashboard/public/fonts.css`) |
|
||||
| **openpanel.dev** (script de terceros) | La IP de cada visitante antes de cualquier consentimiento | 4-sep-2026 — `op1.js` se sirve desde el propio dominio y solo tras aceptar |
|
||||
| **Telegram Bot API** (Telegram FZ-LLC, Dubái, EAU) | **Direcciones de email de clientes** y títulos de vídeos, en las alertas operativas | 4-sep-2026 — las alertas identifican al usuario por los 8 primeros caracteres de su uuid y ya no citan títulos, de modo que Telegram deja de recibir datos personales. El canal sigue existiendo para alertas técnicas |
|
||||
|
||||
## 7. Pendiente de verificación o firma
|
||||
|
||||
Nada de esto se puede hacer desde el repositorio; queda para el responsable:
|
||||
|
||||
1. **Confirmar que la `MANAGED_GEMINI_API_KEY` pertenece a un proyecto de
|
||||
pago.** Los términos gratuitos de AI Studio permiten usar los datos para
|
||||
mejorar los modelos, lo que haría falsa la frase "no se entrena con tu
|
||||
contenido".
|
||||
2. **Firmar y archivar** los DPA de ElevenLabs, fal.ai (+ CCT) y Namecheap
|
||||
(+ CCT). Guardar los PDF con fecha.
|
||||
3. **Verificar la jurisdicción del bucket R2** (debe ser UE) y la región de S3.
|
||||
4. **Identificar al proveedor de proxies estáticos** y el país de DataImpulse,
|
||||
y firmar CCT si están fuera del EEE.
|
||||
5. **Confirmar dónde están físicamente `balrog` y `onepiece`.** La política dice
|
||||
"Hetzner y Contabo, Alemania"; si alguno es hardware propio fuera de un CPD,
|
||||
hay que decirlo y aplicar cifrado de disco.
|
||||
6. **Comprobar que la política de Upload-Post** describe la custodia de tokens
|
||||
de redes sociales en nombre de usuarios de OpenShorts.
|
||||
|
||||
## Historial de cambios
|
||||
|
||||
| Fecha | Cambio |
|
||||
|---|---|
|
||||
| 2026-09-04 | Primera versión publicada. Altas documentadas (ya en uso, no listadas antes): fal.ai, Cloudflare CDN/DNS, Aikount, OpenPanel, proxies de descarga, Google OAuth. Bajas: Google Fonts, script de openpanel.dev y datos personales hacia Telegram. |
|
||||
19
editor.py
19
editor.py
|
|
@ -64,6 +64,25 @@ class VideoEditor:
|
|||
raise TimeoutError("Gemini file processing timed out after 120s.")
|
||||
time.sleep(2)
|
||||
|
||||
def delete_uploaded(self, video_file_obj):
|
||||
"""Remove an uploaded clip from the Gemini Files API.
|
||||
|
||||
The upload is a full copy of the user's video on Google's servers, kept
|
||||
there for 48 h if nobody deletes it. The effects passes need it for one
|
||||
request; every caller must drop it in a ``finally`` right after, so the
|
||||
privacy policy's "we do not leave your footage with the model provider"
|
||||
describes the code. Best-effort: an editing job must not fail because
|
||||
the cleanup call did.
|
||||
"""
|
||||
name = getattr(video_file_obj, "name", None)
|
||||
if not name:
|
||||
return
|
||||
try:
|
||||
self.client.files.delete(name=name)
|
||||
except Exception as e:
|
||||
print(f"⚠️ Could not delete {name} from Gemini Files ({e}) — "
|
||||
f"it expires there in 48 h.")
|
||||
|
||||
def get_ffmpeg_filter(self, video_file_obj, duration, fps=30, width=None, height=None, transcript=None, has_captions=False):
|
||||
"""Asks Gemini for an edit decision list, then builds the FFmpeg filter
|
||||
deterministically (edit_builder) so syntax and zoom limits are always safe."""
|
||||
|
|
|
|||
189
media_auth.py
Normal file
189
media_auth.py
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
"""Capability tokens and path rules for the ``/videos`` and ``/thumbnails`` bytes.
|
||||
|
||||
Both paths used to be ``StaticFiles`` mounts, i.e. the whole working directory
|
||||
served to the internet with a UUID for a lock. That handed out more than the
|
||||
clips: the ``.resume.json`` manifest (which carries the customer's own
|
||||
``webhook_secret``), the ``.owner`` sidecar (a user uuid), the ``.instance``
|
||||
deploy marker, the face crops under ``thumbnails/`` and every actor photo a user
|
||||
had uploaded. ``app.py`` now serves those two prefixes through real handlers
|
||||
that ask who is calling; this module is the part of that with no FastAPI in it,
|
||||
so both ``app.py`` and ``mcp_server.py`` can sign a URL without importing each
|
||||
other.
|
||||
|
||||
Two token shapes, because there are two kinds of consumer:
|
||||
|
||||
* **path capability** (``?exp=…&sig=…``) — an HMAC over one relative path and an
|
||||
expiry. This is what goes to a consumer that cannot send a header at all: the
|
||||
webhook payload and the absolute URLs the MCP tools return. Same idea as the
|
||||
R2 ``presigned_get`` links the history endpoint already hands out, and as
|
||||
``/api/source-url``.
|
||||
* **user token** (``?mt=<uid>.<exp>.<sig>``) — a short-lived bearer for one
|
||||
user, minted at ``/api/media-token``. A ``<video src>`` or ``<img src>``
|
||||
cannot carry an ``Authorization`` header, so the dashboard appends this to
|
||||
every media URL it builds (one place: ``getApiUrl``) instead of leaking the
|
||||
30-day session JWT into query strings, access logs and referrers.
|
||||
|
||||
A request that arrives with an ordinary ``Authorization: Bearer`` / ``X-API-Key``
|
||||
header (agents, ``curl``, the MCP client) needs neither: ``app.py`` resolves the
|
||||
user from the header and compares it to the owner directly.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import hmac
|
||||
import os
|
||||
import posixpath
|
||||
import time
|
||||
from typing import Optional
|
||||
|
||||
# A signed media link has to outlive the page that was handed it. Local working
|
||||
# files are swept after an hour anyway (JOB_RETENTION_SECONDS), so the ceiling
|
||||
# here is about the link, not the file.
|
||||
MEDIA_URL_TTL_SECONDS = int(os.environ.get("MEDIA_URL_TTL_SECONDS", "86400"))
|
||||
# The dashboard's per-user media token. Deliberately much shorter than the
|
||||
# session JWT (30 days): it travels in URLs, so it must die quickly.
|
||||
MEDIA_TOKEN_TTL_SECONDS = int(os.environ.get("MEDIA_TOKEN_TTL_SECONDS", "43200"))
|
||||
|
||||
# Nothing outside this list is a deliverable: the working directories also hold
|
||||
# transcripts, metadata JSON, resume manifests and ownership sidecars, and an
|
||||
# allowlist is the only version of this rule that stays correct when the
|
||||
# pipeline starts writing a new kind of scratch file.
|
||||
SERVABLE_EXTENSIONS = frozenset({
|
||||
".mp4", ".webm", ".mov", ".m4v", ".mkv", ".ogv",
|
||||
".mp3", ".m4a", ".wav", ".aac", ".flac", ".opus",
|
||||
".jpg", ".jpeg", ".png", ".webp", ".gif", ".avif",
|
||||
".srt", ".vtt", ".ass", ".zip",
|
||||
})
|
||||
|
||||
|
||||
class MediaPathError(ValueError):
|
||||
"""The requested path is not something these prefixes may ever serve."""
|
||||
|
||||
|
||||
def normalise_relpath(rel_path: str) -> str:
|
||||
"""Return ``rel_path`` as a clean forward-slash relative path.
|
||||
|
||||
Raises ``MediaPathError`` for absolute paths, traversal, and any segment
|
||||
starting with a dot — which is what keeps ``.resume.json`` (webhook secret),
|
||||
``.owner`` (user uuid), ``.instance`` and ``.transcript_checkpoint.json``
|
||||
unreachable no matter who is asking.
|
||||
"""
|
||||
if not rel_path or not isinstance(rel_path, str):
|
||||
raise MediaPathError("Empty path")
|
||||
cleaned = rel_path.replace("\\", "/").strip("/")
|
||||
if not cleaned:
|
||||
raise MediaPathError("Empty path")
|
||||
if "\x00" in cleaned:
|
||||
raise MediaPathError("Invalid path")
|
||||
segments = [s for s in cleaned.split("/") if s != ""]
|
||||
if not segments:
|
||||
raise MediaPathError("Empty path")
|
||||
for segment in segments:
|
||||
if segment.startswith("."):
|
||||
# Covers "." and ".." as well as every dotfile the pipeline writes.
|
||||
raise MediaPathError(f"Hidden or relative segment: {segment!r}")
|
||||
return posixpath.join(*segments)
|
||||
|
||||
|
||||
def is_servable(rel_path: str) -> bool:
|
||||
"""True if this relative path is both visible and of a deliverable type."""
|
||||
try:
|
||||
cleaned = normalise_relpath(rel_path)
|
||||
except MediaPathError:
|
||||
return False
|
||||
return posixpath.splitext(cleaned)[1].lower() in SERVABLE_EXTENSIONS
|
||||
|
||||
|
||||
def _digest(secret: str, message: str) -> str:
|
||||
return hmac.new((secret or "").encode(), message.encode(),
|
||||
hashlib.sha256).hexdigest()[:32]
|
||||
|
||||
|
||||
# --- path capability -------------------------------------------------------
|
||||
|
||||
def path_signature(rel_path: str, exp: int, secret: str) -> str:
|
||||
"""HMAC tying one relative media path to an expiry."""
|
||||
return _digest(secret, f"media:{normalise_relpath(rel_path)}:{int(exp)}")
|
||||
|
||||
|
||||
def sign_media_url(url_path: str, secret: str, ttl: Optional[int] = None) -> str:
|
||||
"""Append ``?exp=…&sig=…`` to ``/videos/<rel>`` or ``/thumbnails/<rel>``.
|
||||
|
||||
Returns the URL untouched when there is no secret to sign with (self-host:
|
||||
nothing to protect, and a signature keyed on "" would be theatre) or when
|
||||
the path is not one of the two protected prefixes.
|
||||
"""
|
||||
if not secret or not url_path or "?" in url_path:
|
||||
return url_path
|
||||
rel = strip_media_prefix(url_path)
|
||||
if rel is None:
|
||||
return url_path
|
||||
try:
|
||||
exp = int(time.time()) + int(ttl or MEDIA_URL_TTL_SECONDS)
|
||||
sig = path_signature(rel, exp, secret)
|
||||
except MediaPathError:
|
||||
return url_path
|
||||
return f"{url_path}?exp={exp}&sig={sig}"
|
||||
|
||||
|
||||
def verify_path_signature(rel_path: str, exp, sig: str, secret: str) -> bool:
|
||||
"""Constant-time check of a path capability token."""
|
||||
if not secret or not sig:
|
||||
return False
|
||||
try:
|
||||
exp_i = int(exp)
|
||||
except (TypeError, ValueError):
|
||||
return False
|
||||
if exp_i <= int(time.time()):
|
||||
return False
|
||||
try:
|
||||
expected = path_signature(rel_path, exp_i, secret)
|
||||
except MediaPathError:
|
||||
return False
|
||||
return hmac.compare_digest(sig, expected)
|
||||
|
||||
|
||||
# --- per-user token --------------------------------------------------------
|
||||
|
||||
def mint_user_token(user_id, secret: str, ttl: Optional[int] = None) -> str:
|
||||
"""``<uid>.<exp>.<sig>`` — a short-lived media bearer for one user."""
|
||||
uid = str(user_id)
|
||||
exp = int(time.time()) + int(ttl or MEDIA_TOKEN_TTL_SECONDS)
|
||||
return f"{uid}.{exp}.{_digest(secret, f'mediatoken:{uid}:{exp}')}"
|
||||
|
||||
|
||||
def verify_user_token(token: str, secret: str) -> Optional[str]:
|
||||
"""Return the user id a media token proves, or None if it proves nothing."""
|
||||
if not secret or not token or token.count(".") != 2:
|
||||
return None
|
||||
uid, exp_s, sig = token.split(".")
|
||||
try:
|
||||
exp = int(exp_s)
|
||||
except ValueError:
|
||||
return None
|
||||
if exp <= int(time.time()):
|
||||
return None
|
||||
if not hmac.compare_digest(sig, _digest(secret, f"mediatoken:{uid}:{exp}")):
|
||||
return None
|
||||
return uid
|
||||
|
||||
|
||||
# --- prefix helpers --------------------------------------------------------
|
||||
|
||||
MEDIA_PREFIXES = ("/videos/", "/thumbnails/")
|
||||
|
||||
|
||||
def strip_media_prefix(url_path: str) -> Optional[str]:
|
||||
"""``/videos/a/b.mp4`` -> ``videos-relative`` path, or None if not ours.
|
||||
|
||||
``/thumbnails/<x>`` is mounted on ``output/thumbnails`` while ``/videos/<x>``
|
||||
is mounted on ``output``, so the returned path is relative to whichever base
|
||||
the caller's prefix names — the signature only has to be stable, not to
|
||||
describe the filesystem.
|
||||
"""
|
||||
if not url_path:
|
||||
return None
|
||||
for prefix in MEDIA_PREFIXES:
|
||||
if url_path.startswith(prefix):
|
||||
return prefix.strip("/") + "/" + url_path[len(prefix):]
|
||||
return None
|
||||
91
ops/README.md
Normal file
91
ops/README.md
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
# ops/
|
||||
|
||||
Operational scripts for OpenShorts Cloud. Nothing here runs automatically:
|
||||
each file is installed and scheduled on the host that needs it.
|
||||
|
||||
## `pg_backup.sh` — encrypted PostgreSQL backups, 30-day retention
|
||||
|
||||
The only backup mechanism this project has ever had in version control. Art.
|
||||
32.1.c GDPR requires being able to restore availability of personal data after
|
||||
an incident, and the privacy policy now states that a deletion is gone from
|
||||
every copy within 30 days — this script is what makes both sentences true.
|
||||
|
||||
### What it does
|
||||
|
||||
1. `pg_dump` the cloud database (plain SQL, `--no-owner --no-privileges`).
|
||||
2. gzip and **encrypt** it, in the same pipeline, with `age` (recommended) or
|
||||
`gpg`. Only ciphertext ever touches the disk or the bucket. Without a
|
||||
recipient key configured the script exits with an error rather than writing a
|
||||
readable dump — a plaintext copy of `users` in an object store is the
|
||||
incident this file exists to prevent.
|
||||
3. Upload to `s3://…` (works with Cloudflare R2 via `BACKUP_S3_ENDPOINT`) or
|
||||
`gs://…`.
|
||||
4. Delete backups older than `RETENTION_DAYS` (default 30).
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
# On the database host (balrog), as root:
|
||||
apt-get install -y postgresql-client age awscli # or gnupg instead of age
|
||||
install -m 0750 ops/pg_backup.sh /opt/openshorts/ops/pg_backup.sh
|
||||
```
|
||||
|
||||
Generate a key pair **on your laptop, not on the server** — the server only
|
||||
ever needs the public half, which is the whole point:
|
||||
|
||||
```bash
|
||||
age-keygen -o openshorts-backup.key # keep this file in a password manager
|
||||
grep 'public key' openshorts-backup.key # -> age1... goes on the server
|
||||
```
|
||||
|
||||
Then create `/etc/openshorts-backup.env` (mode `0600`):
|
||||
|
||||
```sh
|
||||
DATABASE_URL="postgres://user:pass@127.0.0.1:5432/openshorts"
|
||||
BACKUP_AGE_RECIPIENT="age1................................................"
|
||||
BACKUP_DEST="s3://openshorts-backups/pg"
|
||||
BACKUP_S3_ENDPOINT="https://<accountid>.r2.cloudflarestorage.com"
|
||||
AWS_ACCESS_KEY_ID="..." # an R2 token scoped to THIS bucket only
|
||||
AWS_SECRET_ACCESS_KEY="..."
|
||||
RETENTION_DAYS=30
|
||||
```
|
||||
|
||||
Dry run first — it dumps and encrypts locally but uploads nothing:
|
||||
|
||||
```bash
|
||||
set -a; . /etc/openshorts-backup.env; set +a
|
||||
DRY_RUN=1 /opt/openshorts/ops/pg_backup.sh
|
||||
```
|
||||
|
||||
Schedule it:
|
||||
|
||||
```cron
|
||||
15 3 * * * set -a; . /etc/openshorts-backup.env; set +a; /opt/openshorts/ops/pg_backup.sh >> /var/log/openshorts-backup.log 2>&1
|
||||
```
|
||||
|
||||
### Restore (do this once, before you need it)
|
||||
|
||||
```bash
|
||||
aws s3 cp --endpoint-url "$BACKUP_S3_ENDPOINT" \
|
||||
s3://openshorts-backups/pg/openshorts-pg-20260904T031500Z.sql.gz.age .
|
||||
age -d -i openshorts-backup.key openshorts-pg-*.sql.gz.age | gunzip \
|
||||
| psql "postgres://…/openshorts_restore_test"
|
||||
psql "postgres://…/openshorts_restore_test" -c 'select count(*) from users;'
|
||||
```
|
||||
|
||||
A backup nobody has restored is a hypothesis. Write down the date of the last
|
||||
successful restore test somewhere a person will read.
|
||||
|
||||
### Things to keep true
|
||||
|
||||
- **The bucket is not public and not the same bucket as user clips.** Give the
|
||||
backup token write access to its own bucket and nothing else.
|
||||
- **The private key is not on the server.** If it were, an attacker with the
|
||||
server has both the ciphertext and the key.
|
||||
- **`RETENTION_DAYS` and the privacy policy move together.** The policy tells
|
||||
users a deletion disappears from backups within 30 days
|
||||
(`docs/compliance/retencion.md`, `dashboard/seo/legal.js` §5). Raising the
|
||||
retention without changing that text makes the policy false.
|
||||
- **Object-lock / versioning on the bucket would defeat the retention.** If you
|
||||
enable it for ransomware protection, set the lock window to the same 30 days,
|
||||
not longer.
|
||||
|
|
@ -182,6 +182,14 @@ def detect_content_ranges(video_path, video_duration):
|
|||
|
||||
model_name = os.environ.get("GEMINI_MODEL") or 'gemini-3.1-flash-lite'
|
||||
print("🔎 Checking for full-width on-screen content…")
|
||||
# This is the ONE stage that sends the whole video file to Google rather
|
||||
# than a handful of frames, so it is also the one that leaves a copy of a
|
||||
# user's source on someone else's servers. The Files API keeps an upload for
|
||||
# 48 h unless it is deleted; the finally block below deletes it as soon as
|
||||
# the answer is back, which is what makes "we do not leave your video with
|
||||
# the model provider" a true sentence in the privacy policy.
|
||||
client = None
|
||||
file_upload = None
|
||||
try:
|
||||
client = genai.Client(api_key=api_key)
|
||||
file_upload = client.files.upload(file=video_path)
|
||||
|
|
@ -210,6 +218,16 @@ def detect_content_ranges(video_path, video_duration):
|
|||
except Exception as e:
|
||||
print(f" ⚠️ On-screen check failed ({e}) — keeping face-only routing.")
|
||||
return []
|
||||
finally:
|
||||
# Every exit path, including the two early returns above and the failure
|
||||
# branch: a video left behind because the call raised is exactly the
|
||||
# copy nobody would ever notice.
|
||||
if client is not None and file_upload is not None:
|
||||
try:
|
||||
client.files.delete(name=file_upload.name)
|
||||
except Exception as e:
|
||||
print(f" ⚠️ Could not delete the uploaded source from Gemini "
|
||||
f"Files ({e}) — it expires there in 48 h.")
|
||||
|
||||
ranges = []
|
||||
for r in raw:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,25 @@ import socket
|
|||
from urllib.parse import urlparse
|
||||
|
||||
|
||||
def truncate_ip(ip: str) -> str:
|
||||
"""Drop the host part of an address so it identifies a network, not a device.
|
||||
|
||||
Used for the rights declaration kept with a project (art. 5.1.c: the record
|
||||
has to show the confirmation was made from somewhere at some time, which a
|
||||
/24 answers as well as a full address, and it does not hand anyone a
|
||||
per-device identifier that survives for years). IPv4 keeps three octets,
|
||||
IPv6 keeps the /48 the RIRs actually assign. Anything unparseable becomes
|
||||
"unknown" rather than being stored verbatim.
|
||||
"""
|
||||
try:
|
||||
addr = ipaddress.ip_address((ip or "").strip())
|
||||
except ValueError:
|
||||
return "unknown"
|
||||
if addr.version == 4:
|
||||
return str(ipaddress.ip_network(f"{addr}/24", strict=False).network_address)
|
||||
return str(ipaddress.ip_network(f"{addr}/48", strict=False).network_address)
|
||||
|
||||
|
||||
class UnsafeURLError(ValueError):
|
||||
"""Raised when a URL is not safe to fetch server-side."""
|
||||
|
||||
|
|
|
|||
76
tests/test_ai_disclosure.py
Normal file
76
tests/test_ai_disclosure.py
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
"""AI Act art. 50(2) marking on the images the thumbnail studio generates.
|
||||
|
||||
Videos have carried an mp4 ``comment`` tag since the doubling/AI-Shorts work
|
||||
(``ffmpeg_utils.mark_ai_generated``). Thumbnails carried nothing — and they are
|
||||
the output most likely to be a synthetic image *of a real person*, because the
|
||||
studio hands the model the presenter's own face as a reference. The mark is XMP
|
||||
``Iptc4xmpExt:DigitalSourceType = trainedAlgorithmicMedia``, which is the
|
||||
vocabulary the platforms actually read.
|
||||
"""
|
||||
import io
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
Image = pytest.importorskip("PIL.Image")
|
||||
thumbnail = pytest.importorskip("thumbnail")
|
||||
|
||||
TRAINED = b"trainedAlgorithmicMedia"
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def saved(tmp_path):
|
||||
img = Image.new("RGB", (1600, 900), (12, 14, 20))
|
||||
out = os.path.join(str(tmp_path), "thumb.jpg")
|
||||
thumbnail.finalize_thumbnail(img, out)
|
||||
return out
|
||||
|
||||
|
||||
class TestTheFileIsMarked:
|
||||
def test_the_xmp_packet_names_the_iptc_value(self, saved):
|
||||
assert TRAINED in open(saved, "rb").read()
|
||||
|
||||
def test_pillow_reads_the_marking_back(self, saved):
|
||||
with Image.open(saved) as img:
|
||||
xmp = img.info.get("xmp") or b""
|
||||
assert TRAINED in xmp
|
||||
assert b"Iptc4xmpExt:DigitalSourceType" in xmp
|
||||
|
||||
def test_exif_carries_the_same_claim(self, saved):
|
||||
# Second signal on purpose: a re-encode commonly keeps EXIF and drops
|
||||
# XMP, so the two together survive more pipelines than either alone.
|
||||
with Image.open(saved) as img:
|
||||
exif = img.getexif()
|
||||
assert "OpenShorts" in str(exif.get(0x0131, ""))
|
||||
assert "AI-generated" in str(exif.get(0x010E, ""))
|
||||
|
||||
|
||||
class TestItStaysAThumbnail:
|
||||
def test_the_marking_does_not_break_the_crop_or_the_size_budget(self, saved):
|
||||
with Image.open(saved) as img:
|
||||
assert img.size == (thumbnail.THUMB_W, thumbnail.THUMB_H)
|
||||
assert os.path.getsize(saved) <= thumbnail.THUMB_MAX_BYTES
|
||||
|
||||
def test_an_older_pillow_still_produces_a_thumbnail(self, tmp_path, monkeypatch):
|
||||
# The xmp= save argument is recent. Losing it must cost the XMP half of
|
||||
# the marking, never the image the user paid minutes for.
|
||||
original = Image.Image.save
|
||||
|
||||
def no_xmp(self, fp, *args, **kwargs):
|
||||
if "xmp" in kwargs:
|
||||
raise TypeError("save() got an unexpected keyword argument 'xmp'")
|
||||
return original(self, fp, *args, **kwargs)
|
||||
|
||||
monkeypatch.setattr(Image.Image, "save", no_xmp)
|
||||
out = os.path.join(str(tmp_path), "legacy.jpg")
|
||||
thumbnail.finalize_thumbnail(Image.new("RGB", (1600, 900)), out)
|
||||
assert os.path.getsize(out) > 0
|
||||
with Image.open(out) as img:
|
||||
assert "OpenShorts" in str(img.getexif().get(0x0131, ""))
|
||||
|
||||
|
||||
def test_the_packet_is_well_formed_xml():
|
||||
import xml.etree.ElementTree as ET
|
||||
body = thumbnail.AI_XMP_PACKET.decode("utf-8")
|
||||
body = body.split("?>", 1)[1].rsplit("<?xpacket", 1)[0]
|
||||
ET.fromstring(body) # raises if the packet is malformed
|
||||
64
thumbnail.py
64
thumbnail.py
|
|
@ -516,8 +516,61 @@ def burn_thumbnail_text(img, text, position="left", color="white"):
|
|||
return img
|
||||
|
||||
|
||||
# AI Act art. 50(2): a synthetic image has to be marked in a machine-readable
|
||||
# way, and these thumbnails are exactly the case the article is about — an
|
||||
# image model painting a scene, often around a reference photo of the real
|
||||
# presenter. Videos get the mp4 `comment` tag (ffmpeg_utils.mark_ai_generated);
|
||||
# a JPEG's equivalent is XMP, and the interoperable vocabulary is IPTC's
|
||||
# DigitalSourceType, whose `trainedAlgorithmicMedia` value is what Google,
|
||||
# LinkedIn, TikTok and Adobe already read. Written alongside the EXIF Software
|
||||
# tag because the two survive different pipelines: a re-encode usually keeps
|
||||
# EXIF and drops XMP, a metadata scrub keeps neither, and this is the honest
|
||||
# ceiling of what a JPEG can carry without a C2PA signing key.
|
||||
AI_XMP_PACKET = (
|
||||
'<?xpacket begin="\ufeff" id="W5M0MpCehiHzreSzNTczkc9d"?>'
|
||||
'<x:xmpmeta xmlns:x="adobe:ns:meta/">'
|
||||
'<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">'
|
||||
'<rdf:Description rdf:about=""'
|
||||
' xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/"'
|
||||
' xmlns:xmp="http://ns.adobe.com/xap/1.0/"'
|
||||
' xmlns:dc="http://purl.org/dc/elements/1.1/"'
|
||||
' Iptc4xmpExt:DigitalSourceType='
|
||||
'"http://cv.iptc.org/newscodes/digitalsourcetype/trainedAlgorithmicMedia"'
|
||||
' xmp:CreatorTool="OpenShorts (openshorts.app)">'
|
||||
'<dc:description><rdf:Alt><rdf:li xml:lang="x-default">'
|
||||
'AI-generated image produced with OpenShorts (openshorts.app)'
|
||||
'</rdf:li></rdf:Alt></dc:description>'
|
||||
'</rdf:Description></rdf:RDF></x:xmpmeta>'
|
||||
'<?xpacket end="w"?>'
|
||||
).encode("utf-8")
|
||||
|
||||
AI_SOFTWARE_TAG = "OpenShorts (openshorts.app) — AI-generated image"
|
||||
|
||||
|
||||
def _ai_save_kwargs(img):
|
||||
"""XMP + EXIF marking for a generated image. Never raises.
|
||||
|
||||
Pillow grew the ``xmp=`` save argument for JPEG relatively late, so an
|
||||
older Pillow simply gets the EXIF half rather than failing the render.
|
||||
"""
|
||||
kwargs = {}
|
||||
try:
|
||||
exif = img.getexif()
|
||||
exif[0x0131] = AI_SOFTWARE_TAG # Software
|
||||
exif[0x010E] = AI_SOFTWARE_TAG # ImageDescription
|
||||
kwargs["exif"] = exif.tobytes()
|
||||
except Exception:
|
||||
pass
|
||||
kwargs["xmp"] = AI_XMP_PACKET
|
||||
return kwargs
|
||||
|
||||
|
||||
def finalize_thumbnail(img, out_path):
|
||||
"""Cover-crop to 1280x720 and save a JPEG under YouTube's 2 MB limit."""
|
||||
"""Cover-crop to 1280x720 and save a JPEG under YouTube's 2 MB limit.
|
||||
|
||||
Every file that leaves here is machine-marked as AI-generated — see
|
||||
AI_XMP_PACKET.
|
||||
"""
|
||||
img = img.convert("RGB")
|
||||
scale = max(THUMB_W / img.width, THUMB_H / img.height)
|
||||
img = img.resize((max(THUMB_W, int(img.width * scale + 0.5)),
|
||||
|
|
@ -525,8 +578,15 @@ def finalize_thumbnail(img, out_path):
|
|||
left = (img.width - THUMB_W) // 2
|
||||
top = (img.height - THUMB_H) // 2
|
||||
img = img.crop((left, top, left + THUMB_W, top + THUMB_H))
|
||||
marks = _ai_save_kwargs(img)
|
||||
for q in (92, 88, 84, 78, 70, 60):
|
||||
img.save(out_path, "JPEG", quality=q, optimize=True)
|
||||
try:
|
||||
img.save(out_path, "JPEG", quality=q, optimize=True, **marks)
|
||||
except (TypeError, ValueError):
|
||||
# An older Pillow without the xmp= argument: keep the EXIF mark
|
||||
# rather than losing the thumbnail.
|
||||
marks.pop("xmp", None)
|
||||
img.save(out_path, "JPEG", quality=q, optimize=True, **marks)
|
||||
if os.path.getsize(out_path) <= THUMB_MAX_BYTES:
|
||||
break
|
||||
return out_path
|
||||
|
|
|
|||
Loading…
Reference in a new issue