From b68ddf895b00cfaf2b6f692ac93a1e0057283f1a Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 09:06:39 +0000 Subject: [PATCH] =?UTF-8?q?Mots=20de=20passe=20fuit=C3=A9s=20refus=C3=A9s?= =?UTF-8?q?=20(Have=20I=20Been=20Pwned,=20k-anonymat)=20=C3=A0=20l'inscrip?= =?UTF-8?q?tion=20et=20au=20changement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remplace l'option payante « Prevent use of leaked passwords » de Supabase : seuls 5 caractères de l'empreinte SHA-1 sont envoyés ; en cas de panne réseau on laisse passer. CSP connect-src, message en 18 langues, politique de confidentialité mise à jour. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe --- public/privacy.html | 1 + src/i18n/locales/ar.ts | 1 + src/i18n/locales/de.ts | 1 + src/i18n/locales/en.ts | 1 + src/i18n/locales/es.ts | 1 + src/i18n/locales/fr.ts | 1 + src/i18n/locales/hi.ts | 1 + src/i18n/locales/id.ts | 1 + src/i18n/locales/it.ts | 1 + src/i18n/locales/ja.ts | 1 + src/i18n/locales/ko.ts | 1 + src/i18n/locales/nl.ts | 1 + src/i18n/locales/pl.ts | 1 + src/i18n/locales/pt.ts | 1 + src/i18n/locales/ru.ts | 1 + src/i18n/locales/th.ts | 1 + src/i18n/locales/tr.ts | 1 + src/i18n/locales/vi.ts | 1 + src/i18n/locales/zh.ts | 1 + src/lib/cloud/auth.ts | 3 +++ src/lib/pwned.ts | 40 ++++++++++++++++++++++++++++++++++++++++ vite.config.ts | 2 +- 22 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 src/lib/pwned.ts diff --git a/public/privacy.html b/public/privacy.html index a0d2029..f6a5c46 100644 --- a/public/privacy.html +++ b/public/privacy.html @@ -60,6 +60,7 @@
  • Supabase Inc. (base de données, authentification, stockage des photos) — sous-traitant, données hébergées dans l'Union européenne (Irlande).
  • OVH SAS (Roubaix, France) — héberge les fichiers du site. Ce serveur ne reçoit aucune de tes données de compte ; comme tout serveur web, il voit ton adresse IP le temps de te servir les pages.
  • TMDB et AniList — fournissent les fiches et les images des œuvres. Tes recherches leur sont transmises (pour TMDB via notre serveur, sans ton identité — ou directement si tu as renseigné ta propre clé TMDB dans les réglages), et ton navigateur télécharge les affiches directement chez eux, ce qui leur révèle ton adresse IP, comme n'importe quel site qui affiche leurs images. Aucune donnée de compte ne leur est envoyée. Les plateformes affichées dans « Où regarder » viennent de JustWatch (via TMDB) ; le pays choisi reste sur ton appareil, et un lien vers une plateforme n'est ouvert que si tu cliques dessus.
  • +
  • Have I Been Pwned — quand tu crées un compte ou changes ton mot de passe, l'app vérifie qu'il n'apparaît pas dans une fuite de données connue. Seuls les 5 premiers caractères d'une empreinte chiffrée du mot de passe sont envoyés : ni le mot de passe, ni ton e-mail, ni rien qui permette de le retrouver.
  • Sur ton appareil

    diff --git a/src/i18n/locales/ar.ts b/src/i18n/locales/ar.ts index 70d17d7..b68195c 100644 --- a/src/i18n/locales/ar.ts +++ b/src/i18n/locales/ar.ts @@ -199,6 +199,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'أكّد عنوانك أولًا عبر الرابط الذي وصلك بالبريد الإلكتروني.', 'auth.err.exists': 'يوجد حساب بهذا البريد الإلكتروني بالفعل.', 'auth.err.weak': 'كلمة المرور ضعيفة جدًا ({n} أحرف على الأقل، مزيج من الحروف والأرقام).', + 'auth.err.pwned': "ظهرت كلمة المرور هذه في تسريب بيانات معروف — اختر كلمة أخرى.", 'auth.err.samePassword': 'يجب أن تختلف كلمة المرور الجديدة عن القديمة.', 'auth.err.emailRate': 'طلبات كثيرة جدًا. أعد المحاولة بعد بضع دقائق.', 'auth.err.rate': 'محاولات كثيرة جدًا. أعد المحاولة بعد بضع دقائق.', diff --git a/src/i18n/locales/de.ts b/src/i18n/locales/de.ts index dc42fca..75fb5a9 100644 --- a/src/i18n/locales/de.ts +++ b/src/i18n/locales/de.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Bestätige zuerst deine Adresse über den Link in der E-Mail.', 'auth.err.exists': 'Mit dieser E-Mail gibt es schon ein Konto.', 'auth.err.weak': 'Passwort zu schwach (mindestens {n} Zeichen, Buchstaben und Zahlen gemischt).', + 'auth.err.pwned': "Dieses Passwort ist in einem bekannten Datenleck aufgetaucht – bitte wähle ein anderes.", 'auth.err.samePassword': 'Das neue Passwort muss sich vom alten unterscheiden.', 'auth.err.emailRate': 'Zu viele Anfragen. Versuch’s in ein paar Minuten nochmal.', 'auth.err.rate': 'Zu viele Versuche. Versuch’s in ein paar Minuten nochmal.', diff --git a/src/i18n/locales/en.ts b/src/i18n/locales/en.ts index 1a1e769..60b38b1 100644 --- a/src/i18n/locales/en.ts +++ b/src/i18n/locales/en.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Confirm your address first with the link we emailed you.', 'auth.err.exists': 'An account already exists with this email.', 'auth.err.weak': 'Password too weak (at least {n} characters, mix letters and numbers).', + 'auth.err.pwned': "This password has appeared in a known data breach — please choose another one.", 'auth.err.samePassword': 'Your new password must be different from the old one.', 'auth.err.emailRate': 'Too many requests. Try again in a few minutes.', 'auth.err.rate': 'Too many attempts. Try again in a few minutes.', diff --git a/src/i18n/locales/es.ts b/src/i18n/locales/es.ts index 7e6c5c3..6a3accc 100644 --- a/src/i18n/locales/es.ts +++ b/src/i18n/locales/es.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Primero confirma tu dirección con el enlace que recibiste por correo.', 'auth.err.exists': 'Ya existe una cuenta con este correo.', 'auth.err.weak': 'Contraseña demasiado débil (al menos {n} caracteres, mezcla letras y números).', + 'auth.err.pwned': "Esta contraseña apareció en una filtración de datos conocida: elige otra.", 'auth.err.samePassword': 'La nueva contraseña tiene que ser distinta de la anterior.', 'auth.err.emailRate': 'Demasiadas solicitudes. Vuelve a intentarlo en unos minutos.', 'auth.err.rate': 'Demasiados intentos. Vuelve a intentarlo en unos minutos.', diff --git a/src/i18n/locales/fr.ts b/src/i18n/locales/fr.ts index c28aefb..aa777c7 100644 --- a/src/i18n/locales/fr.ts +++ b/src/i18n/locales/fr.ts @@ -198,6 +198,7 @@ const dict = { 'auth.err.notConfirmed': 'Confirme d\'abord ton adresse avec le lien reçu par email.', 'auth.err.exists': 'Un compte existe déjà avec cet email.', 'auth.err.weak': 'Mot de passe trop faible (au moins {n} caractères, mélange lettres et chiffres).', + 'auth.err.pwned': "Ce mot de passe est apparu dans une fuite de données connue : choisis-en un autre.", 'auth.err.samePassword': 'Le nouveau mot de passe doit être différent de l\'ancien.', 'auth.err.emailRate': 'Trop de demandes. Réessaie dans quelques minutes.', 'auth.err.rate': 'Trop de tentatives. Réessaie dans quelques minutes.', diff --git a/src/i18n/locales/hi.ts b/src/i18n/locales/hi.ts index 6bafb9a..9381440 100644 --- a/src/i18n/locales/hi.ts +++ b/src/i18n/locales/hi.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'पहले ईमेल में मिले लिंक से अपना पता कन्फ़र्म करें।', 'auth.err.exists': 'इस ईमेल से पहले से एक अकाउंट मौजूद है।', 'auth.err.weak': 'पासवर्ड बहुत कमज़ोर है (कम से कम {n} कैरेक्टर, अक्षर और अंक मिलाकर)।', + 'auth.err.pwned': "यह पासवर्ड किसी ज्ञात डेटा लीक में सामने आ चुका है — कृपया कोई दूसरा चुनें।", 'auth.err.samePassword': 'नया पासवर्ड पुराने से अलग होना चाहिए।', 'auth.err.emailRate': 'बहुत ज़्यादा रिक्वेस्ट। कुछ मिनट बाद फिर कोशिश करें।', 'auth.err.rate': 'बहुत ज़्यादा कोशिशें। कुछ मिनट बाद फिर कोशिश करें।', diff --git a/src/i18n/locales/id.ts b/src/i18n/locales/id.ts index 805690b..ad7bb24 100644 --- a/src/i18n/locales/id.ts +++ b/src/i18n/locales/id.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Konfirmasi dulu alamatmu lewat tautan yang dikirim ke email.', 'auth.err.exists': 'Sudah ada akun dengan email ini.', 'auth.err.weak': 'Kata sandi terlalu lemah (minimal {n} karakter, campur huruf dan angka).', + 'auth.err.pwned': "Kata sandi ini pernah muncul dalam kebocoran data yang diketahui — pilih yang lain.", 'auth.err.samePassword': 'Kata sandi baru harus beda dari yang lama.', 'auth.err.emailRate': 'Terlalu banyak permintaan. Coba lagi beberapa menit lagi.', 'auth.err.rate': 'Terlalu banyak percobaan. Coba lagi beberapa menit lagi.', diff --git a/src/i18n/locales/it.ts b/src/i18n/locales/it.ts index a7fb8b2..5cc8753 100644 --- a/src/i18n/locales/it.ts +++ b/src/i18n/locales/it.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Prima conferma il tuo indirizzo con il link ricevuto via email.', 'auth.err.exists': 'Esiste già un account con questa email.', 'auth.err.weak': 'Password troppo debole (almeno {n} caratteri, mescola lettere e numeri).', + 'auth.err.pwned': "Questa password è comparsa in una fuga di dati nota: scegline un'altra.", 'auth.err.samePassword': 'La nuova password deve essere diversa da quella vecchia.', 'auth.err.emailRate': 'Troppe richieste. Riprova tra qualche minuto.', 'auth.err.rate': 'Troppi tentativi. Riprova tra qualche minuto.', diff --git a/src/i18n/locales/ja.ts b/src/i18n/locales/ja.ts index ee81605..f0c950d 100644 --- a/src/i18n/locales/ja.ts +++ b/src/i18n/locales/ja.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': '先にメールで届いたリンクからアドレスを確認してください。', 'auth.err.exists': 'このメールアドレスのアカウントはすでに存在します。', 'auth.err.weak': 'パスワードが弱すぎます({n}文字以上、英字と数字を組み合わせてください)。', + 'auth.err.pwned': "このパスワードは既知のデータ漏えいで見つかっています。別のパスワードを選んでください。", 'auth.err.samePassword': '新しいパスワードは以前のものと違うものにしてください。', 'auth.err.emailRate': 'リクエストが多すぎます。数分後にもう一度お試しください。', 'auth.err.rate': '試行回数が多すぎます。数分後にもう一度お試しください。', diff --git a/src/i18n/locales/ko.ts b/src/i18n/locales/ko.ts index a99da9b..38e5492 100644 --- a/src/i18n/locales/ko.ts +++ b/src/i18n/locales/ko.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': '먼저 이메일로 받은 링크로 주소를 인증해 주세요.', 'auth.err.exists': '이미 이 이메일로 가입된 계정이 있어요.', 'auth.err.weak': '비밀번호가 너무 약해요 ({n}자 이상, 영문과 숫자를 섞어 주세요).', + 'auth.err.pwned': "이 비밀번호는 알려진 데이터 유출에서 발견됐어요. 다른 비밀번호를 선택해 주세요.", 'auth.err.samePassword': '새 비밀번호는 이전 비밀번호와 달라야 해요.', 'auth.err.emailRate': '요청이 너무 많아요. 몇 분 뒤에 다시 시도해 주세요.', 'auth.err.rate': '시도 횟수가 너무 많아요. 몇 분 뒤에 다시 시도해 주세요.', diff --git a/src/i18n/locales/nl.ts b/src/i18n/locales/nl.ts index 6e71db6..9106af8 100644 --- a/src/i18n/locales/nl.ts +++ b/src/i18n/locales/nl.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Bevestig eerst je adres via de link in je e-mail.', 'auth.err.exists': 'Er bestaat al een account met dit e-mailadres.', 'auth.err.weak': 'Wachtwoord te zwak (minstens {n} tekens, mix van letters en cijfers).', + 'auth.err.pwned': "Dit wachtwoord is uitgelekt bij een bekend datalek — kies een ander.", 'auth.err.samePassword': 'Je nieuwe wachtwoord moet anders zijn dan het oude.', 'auth.err.emailRate': 'Te veel verzoeken. Probeer het over een paar minuten opnieuw.', 'auth.err.rate': 'Te veel pogingen. Probeer het over een paar minuten opnieuw.', diff --git a/src/i18n/locales/pl.ts b/src/i18n/locales/pl.ts index 26fba8b..d7f9771 100644 --- a/src/i18n/locales/pl.ts +++ b/src/i18n/locales/pl.ts @@ -198,6 +198,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Najpierw potwierdź swój adres linkiem z e-maila.', 'auth.err.exists': 'Konto z tym adresem e-mail już istnieje.', 'auth.err.weak': 'Hasło jest za słabe (co najmniej {n} znaków, litery i cyfry).', + 'auth.err.pwned': "To hasło pojawiło się w znanym wycieku danych — wybierz inne.", 'auth.err.samePassword': 'Nowe hasło musi być inne niż poprzednie.', 'auth.err.emailRate': 'Za dużo próśb. Spróbuj ponownie za kilka minut.', 'auth.err.rate': 'Za dużo prób. Spróbuj ponownie za kilka minut.', diff --git a/src/i18n/locales/pt.ts b/src/i18n/locales/pt.ts index 273a067..5c95b54 100644 --- a/src/i18n/locales/pt.ts +++ b/src/i18n/locales/pt.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Primeiro confirme seu endereço com o link que você recebeu por e-mail.', 'auth.err.exists': 'Já existe uma conta com esse e-mail.', 'auth.err.weak': 'Senha muito fraca (pelo menos {n} caracteres, misturando letras e números).', + 'auth.err.pwned': "Esta palavra-passe apareceu numa fuga de dados conhecida: escolhe outra.", 'auth.err.samePassword': 'A nova senha precisa ser diferente da antiga.', 'auth.err.emailRate': 'Muitas solicitações. Tente de novo em alguns minutos.', 'auth.err.rate': 'Muitas tentativas. Tente de novo em alguns minutos.', diff --git a/src/i18n/locales/ru.ts b/src/i18n/locales/ru.ts index 272ddc5..ad3c5f3 100644 --- a/src/i18n/locales/ru.ts +++ b/src/i18n/locales/ru.ts @@ -198,6 +198,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Сначала подтверди адрес по ссылке из письма.', 'auth.err.exists': 'Аккаунт с этой почтой уже существует.', 'auth.err.weak': 'Слишком простой пароль (минимум {n} символов, буквы и цифры).', + 'auth.err.pwned': "Этот пароль встречался в известной утечке данных — выбери другой.", 'auth.err.samePassword': 'Новый пароль должен отличаться от старого.', 'auth.err.emailRate': 'Слишком много запросов. Попробуй через несколько минут.', 'auth.err.rate': 'Слишком много попыток. Попробуй через несколько минут.', diff --git a/src/i18n/locales/th.ts b/src/i18n/locales/th.ts index bf9e46c..7df1fe4 100644 --- a/src/i18n/locales/th.ts +++ b/src/i18n/locales/th.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'ยืนยันอีเมลของคุณก่อนด้วยลิงก์ที่เราส่งไปให้', 'auth.err.exists': 'มีบัญชีที่ใช้อีเมลนี้อยู่แล้ว', 'auth.err.weak': 'รหัสผ่านไม่ปลอดภัยพอ (อย่างน้อย {n} ตัวอักษร ผสมตัวอักษรและตัวเลข)', + 'auth.err.pwned': "รหัสผ่านนี้เคยหลุดในเหตุข้อมูลรั่วไหลที่ทราบกัน — โปรดเลือกรหัสอื่น", 'auth.err.samePassword': 'รหัสผ่านใหม่ต้องไม่ซ้ำกับรหัสผ่านเดิม', 'auth.err.emailRate': 'ส่งคำขอบ่อยเกินไป ลองใหม่อีกครั้งในอีกไม่กี่นาที', 'auth.err.rate': 'พยายามหลายครั้งเกินไป ลองใหม่อีกครั้งในอีกไม่กี่นาที', diff --git a/src/i18n/locales/tr.ts b/src/i18n/locales/tr.ts index 7c293d8..31b8e9a 100644 --- a/src/i18n/locales/tr.ts +++ b/src/i18n/locales/tr.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Önce e-postayla gelen bağlantıyla adresini onayla.', 'auth.err.exists': 'Bu e-postayla zaten bir hesap var.', 'auth.err.weak': 'Şifre çok zayıf (en az {n} karakter, harf ve rakam karışık).', + 'auth.err.pwned': "Bu şifre bilinen bir veri sızıntısında yer aldı — lütfen başka bir şifre seç.", 'auth.err.samePassword': 'Yeni şifren eskisinden farklı olmalı.', 'auth.err.emailRate': 'Çok fazla istek. Birkaç dakika sonra tekrar dene.', 'auth.err.rate': 'Çok fazla deneme. Birkaç dakika sonra tekrar dene.', diff --git a/src/i18n/locales/vi.ts b/src/i18n/locales/vi.ts index c3a1378..1a05eb5 100644 --- a/src/i18n/locales/vi.ts +++ b/src/i18n/locales/vi.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': 'Hãy xác nhận địa chỉ email trước bằng liên kết đã gửi cho bạn.', 'auth.err.exists': 'Đã có tài khoản dùng email này.', 'auth.err.weak': 'Mật khẩu quá yếu (ít nhất {n} ký tự, kết hợp chữ và số).', + 'auth.err.pwned': "Mật khẩu này đã xuất hiện trong một vụ rò rỉ dữ liệu đã biết — hãy chọn mật khẩu khác.", 'auth.err.samePassword': 'Mật khẩu mới phải khác mật khẩu cũ.', 'auth.err.emailRate': 'Quá nhiều yêu cầu. Thử lại sau vài phút nhé.', 'auth.err.rate': 'Quá nhiều lần thử. Thử lại sau vài phút nhé.', diff --git a/src/i18n/locales/zh.ts b/src/i18n/locales/zh.ts index df2718f..a29f20e 100644 --- a/src/i18n/locales/zh.ts +++ b/src/i18n/locales/zh.ts @@ -196,6 +196,7 @@ const dict: Translations = { 'auth.err.notConfirmed': '请先通过邮件里的链接验证你的邮箱。', 'auth.err.exists': '该邮箱已注册账号。', 'auth.err.weak': '密码太弱(至少{n}个字符,需混合字母和数字)。', + 'auth.err.pwned': "此密码曾出现在已知的数据泄露中,请换一个。", 'auth.err.samePassword': '新密码不能与旧密码相同。', 'auth.err.emailRate': '请求太频繁了,过几分钟再试吧。', 'auth.err.rate': '尝试次数太多,过几分钟再试吧。', diff --git a/src/lib/cloud/auth.ts b/src/lib/cloud/auth.ts index e275731..4331763 100644 --- a/src/lib/cloud/auth.ts +++ b/src/lib/cloud/auth.ts @@ -1,5 +1,6 @@ import { t, type TKey } from '../../i18n' import { SUPABASE_ANON_KEY, SUPABASE_URL } from './config' +import { isPwnedPassword } from '../pwned' /** * Connexion aux comptes (Supabase Auth), sans dépendance. @@ -163,6 +164,7 @@ export async function signIn(email: string, password: string): Promise { /** Inscription. Le pseudo choisi est repris par la base à la création du profil (s'il est libre). */ export async function signUp(email: string, password: string, username?: string): Promise { if (password.length < PASSWORD_MIN) throw new AuthError(t('auth.err.weak', { n: PASSWORD_MIN })) + if (await isPwnedPassword(password)) throw new AuthError(t('auth.err.pwned')) const data = await gotrue(`/signup?redirect_to=${encodeURIComponent(appUrl())}`, { body: { email: cleanEmail(email), password, ...(username ? { data: { username } } : {}) }, }) @@ -180,6 +182,7 @@ export async function requestPasswordReset(email: string): Promise { export async function updatePassword(password: string): Promise { if (password.length < PASSWORD_MIN) throw new AuthError(t('auth.err.weak', { n: PASSWORD_MIN })) + if (await isPwnedPassword(password)) throw new AuthError(t('auth.err.pwned')) const token = await getAccessToken() if (!token) throw new AuthError(t('auth.err.session')) await gotrue('/user', { method: 'PUT', body: { password }, token }) diff --git a/src/lib/pwned.ts b/src/lib/pwned.ts new file mode 100644 index 0000000..f51d657 --- /dev/null +++ b/src/lib/pwned.ts @@ -0,0 +1,40 @@ +/** + * Mot de passe déjà apparu dans une fuite de données ? (base publique Have I Been Pwned) + * + * k-anonymat : seuls les 5 premiers caractères de l'empreinte SHA-1 du mot de passe sont envoyés ; + * le service renvoie toutes les empreintes qui commencent pareil (avec du remplissage aléatoire) + * et la comparaison se fait ici. Le mot de passe, et même son empreinte complète, ne quittent jamais l'appareil. + * + * Remplace l'option payante « Prevent use of leaked passwords » de Supabase. + * En cas de panne réseau, on laisse passer (la longueur minimale reste vérifiée). + */ +export async function isPwnedPassword(password: string): Promise { + try { + const digest = await crypto.subtle.digest('SHA-1', new TextEncoder().encode(password)) + const hex = [...new Uint8Array(digest)].map((b) => b.toString(16).padStart(2, '0')).join('').toUpperCase() + const prefix = hex.slice(0, 5) + const suffix = hex.slice(5) + const ctrl = new AbortController() + const timer = setTimeout(() => ctrl.abort(), 5000) + try { + const res = await fetch(`https://api.pwnedpasswords.com/range/${prefix}`, { + headers: { 'Add-Padding': 'true' }, + signal: ctrl.signal, + credentials: 'omit', + referrerPolicy: 'no-referrer', + }) + if (!res.ok) return false + const text = await res.text() + for (const line of text.split('\n')) { + const [s, count] = line.trim().split(':') + // Les lignes de remplissage ont un compteur à 0 + if (s === suffix && Number(count) > 0) return true + } + return false + } finally { + clearTimeout(timer) + } + } catch { + return false + } +} diff --git a/vite.config.ts b/vite.config.ts index 641e32d..c284c7c 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -18,7 +18,7 @@ export const buildCsp = (supabaseUrl = '') => [ "style-src 'self' 'unsafe-inline'", `img-src 'self' data: blob: https://image.tmdb.org https://s4.anilist.co${supabaseUrl ? ' ' + supabaseUrl : ''}`, "font-src 'self'", - `connect-src 'self' https://api.themoviedb.org https://graphql.anilist.co https://image.tmdb.org https://s4.anilist.co${supabaseUrl ? ' ' + supabaseUrl : ''}`, + `connect-src 'self' https://api.themoviedb.org https://graphql.anilist.co https://image.tmdb.org https://s4.anilist.co https://api.pwnedpasswords.com${supabaseUrl ? ' ' + supabaseUrl : ''}`, "manifest-src 'self'", "worker-src 'self'", "media-src 'none'",