Mots de passe fuités refusés (Have I Been Pwned, k-anonymat) à l'inscription et au changement
deploy / deploy (push) Successful in 35s

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
Claude committed 2026-10-10 09:06:39 +00:00
1 parent 8eda394ae3
commit b68ddf895b
22 files changed
+63 -1

No files matched your search

+1
View File
@@ -60,6 +60,7 @@
<li><strong>Supabase Inc.</strong> (base de données, authentification, stockage des photos) — sous-traitant, données hébergées dans l'<strong>Union européenne (Irlande)</strong>.</li> <li><strong>Supabase Inc.</strong> (base de données, authentification, stockage des photos) — sous-traitant, données hébergées dans l'<strong>Union européenne (Irlande)</strong>.</li>
<li><strong>OVH SAS</strong> (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.</li> <li><strong>OVH SAS</strong> (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.</li>
<li><strong>TMDB et AniList</strong> — 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.</li> <li><strong>TMDB et AniList</strong> — 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.</li>
<li><strong>Have I Been Pwned</strong> — 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.</li>
</ul> </ul>
<h2>Sur ton appareil</h2> <h2>Sur ton appareil</h2>
+1
View File
@@ -199,6 +199,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'أكّد عنوانك أولًا عبر الرابط الذي وصلك بالبريد الإلكتروني.', 'auth.err.notConfirmed': 'أكّد عنوانك أولًا عبر الرابط الذي وصلك بالبريد الإلكتروني.',
'auth.err.exists': 'يوجد حساب بهذا البريد الإلكتروني بالفعل.', 'auth.err.exists': 'يوجد حساب بهذا البريد الإلكتروني بالفعل.',
'auth.err.weak': 'كلمة المرور ضعيفة جدًا ({n} أحرف على الأقل، مزيج من الحروف والأرقام).', 'auth.err.weak': 'كلمة المرور ضعيفة جدًا ({n} أحرف على الأقل، مزيج من الحروف والأرقام).',
'auth.err.pwned': "ظهرت كلمة المرور هذه في تسريب بيانات معروف — اختر كلمة أخرى.",
'auth.err.samePassword': 'يجب أن تختلف كلمة المرور الجديدة عن القديمة.', 'auth.err.samePassword': 'يجب أن تختلف كلمة المرور الجديدة عن القديمة.',
'auth.err.emailRate': 'طلبات كثيرة جدًا. أعد المحاولة بعد بضع دقائق.', 'auth.err.emailRate': 'طلبات كثيرة جدًا. أعد المحاولة بعد بضع دقائق.',
'auth.err.rate': 'محاولات كثيرة جدًا. أعد المحاولة بعد بضع دقائق.', 'auth.err.rate': 'محاولات كثيرة جدًا. أعد المحاولة بعد بضع دقائق.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Bestätige zuerst deine Adresse über den Link in der E-Mail.', '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.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.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.samePassword': 'Das neue Passwort muss sich vom alten unterscheiden.',
'auth.err.emailRate': 'Zu viele Anfragen. Versuch’s in ein paar Minuten nochmal.', '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.', 'auth.err.rate': 'Zu viele Versuche. Versuch’s in ein paar Minuten nochmal.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Confirm your address first with the link we emailed you.', '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.exists': 'An account already exists with this email.',
'auth.err.weak': 'Password too weak (at least {n} characters, mix letters and numbers).', '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.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.emailRate': 'Too many requests. Try again in a few minutes.',
'auth.err.rate': 'Too many attempts. Try again in a few minutes.', 'auth.err.rate': 'Too many attempts. Try again in a few minutes.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Primero confirma tu dirección con el enlace que recibiste por correo.', '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.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.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.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.emailRate': 'Demasiadas solicitudes. Vuelve a intentarlo en unos minutos.',
'auth.err.rate': 'Demasiados intentos. Vuelve a intentarlo en unos minutos.', 'auth.err.rate': 'Demasiados intentos. Vuelve a intentarlo en unos minutos.',
+1
View File
@@ -198,6 +198,7 @@ const dict = {
'auth.err.notConfirmed': 'Confirme d\'abord ton adresse avec le lien reçu par email.', '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.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.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.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.emailRate': 'Trop de demandes. Réessaie dans quelques minutes.',
'auth.err.rate': 'Trop de tentatives. Réessaie dans quelques minutes.', 'auth.err.rate': 'Trop de tentatives. Réessaie dans quelques minutes.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'पहले ईमेल में मिले लिंक से अपना पता कन्फ़र्म करें।', 'auth.err.notConfirmed': 'पहले ईमेल में मिले लिंक से अपना पता कन्फ़र्म करें।',
'auth.err.exists': 'इस ईमेल से पहले से एक अकाउंट मौजूद है।', 'auth.err.exists': 'इस ईमेल से पहले से एक अकाउंट मौजूद है।',
'auth.err.weak': 'पासवर्ड बहुत कमज़ोर है (कम से कम {n} कैरेक्टर, अक्षर और अंक मिलाकर)।', 'auth.err.weak': 'पासवर्ड बहुत कमज़ोर है (कम से कम {n} कैरेक्टर, अक्षर और अंक मिलाकर)।',
'auth.err.pwned': "यह पासवर्ड किसी ज्ञात डेटा लीक में सामने आ चुका है — कृपया कोई दूसरा चुनें।",
'auth.err.samePassword': 'नया पासवर्ड पुराने से अलग होना चाहिए।', 'auth.err.samePassword': 'नया पासवर्ड पुराने से अलग होना चाहिए।',
'auth.err.emailRate': 'बहुत ज़्यादा रिक्वेस्ट। कुछ मिनट बाद फिर कोशिश करें।', 'auth.err.emailRate': 'बहुत ज़्यादा रिक्वेस्ट। कुछ मिनट बाद फिर कोशिश करें।',
'auth.err.rate': 'बहुत ज़्यादा कोशिशें। कुछ मिनट बाद फिर कोशिश करें।', 'auth.err.rate': 'बहुत ज़्यादा कोशिशें। कुछ मिनट बाद फिर कोशिश करें।',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Konfirmasi dulu alamatmu lewat tautan yang dikirim ke email.', 'auth.err.notConfirmed': 'Konfirmasi dulu alamatmu lewat tautan yang dikirim ke email.',
'auth.err.exists': 'Sudah ada akun dengan email ini.', '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.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.samePassword': 'Kata sandi baru harus beda dari yang lama.',
'auth.err.emailRate': 'Terlalu banyak permintaan. Coba lagi beberapa menit lagi.', 'auth.err.emailRate': 'Terlalu banyak permintaan. Coba lagi beberapa menit lagi.',
'auth.err.rate': 'Terlalu banyak percobaan. Coba lagi beberapa menit lagi.', 'auth.err.rate': 'Terlalu banyak percobaan. Coba lagi beberapa menit lagi.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Prima conferma il tuo indirizzo con il link ricevuto via email.', '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.exists': 'Esiste già un account con questa email.',
'auth.err.weak': 'Password troppo debole (almeno {n} caratteri, mescola lettere e numeri).', '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.samePassword': 'La nuova password deve essere diversa da quella vecchia.',
'auth.err.emailRate': 'Troppe richieste. Riprova tra qualche minuto.', 'auth.err.emailRate': 'Troppe richieste. Riprova tra qualche minuto.',
'auth.err.rate': 'Troppi tentativi. Riprova tra qualche minuto.', 'auth.err.rate': 'Troppi tentativi. Riprova tra qualche minuto.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': '先にメールで届いたリンクからアドレスを確認してください。', 'auth.err.notConfirmed': '先にメールで届いたリンクからアドレスを確認してください。',
'auth.err.exists': 'このメールアドレスのアカウントはすでに存在します。', 'auth.err.exists': 'このメールアドレスのアカウントはすでに存在します。',
'auth.err.weak': 'パスワードが弱すぎます({n}文字以上、英字と数字を組み合わせてください)。', 'auth.err.weak': 'パスワードが弱すぎます({n}文字以上、英字と数字を組み合わせてください)。',
'auth.err.pwned': "このパスワードは既知のデータ漏えいで見つかっています。別のパスワードを選んでください。",
'auth.err.samePassword': '新しいパスワードは以前のものと違うものにしてください。', 'auth.err.samePassword': '新しいパスワードは以前のものと違うものにしてください。',
'auth.err.emailRate': 'リクエストが多すぎます。数分後にもう一度お試しください。', 'auth.err.emailRate': 'リクエストが多すぎます。数分後にもう一度お試しください。',
'auth.err.rate': '試行回数が多すぎます。数分後にもう一度お試しください。', 'auth.err.rate': '試行回数が多すぎます。数分後にもう一度お試しください。',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': '먼저 이메일로 받은 링크로 주소를 인증해 주세요.', 'auth.err.notConfirmed': '먼저 이메일로 받은 링크로 주소를 인증해 주세요.',
'auth.err.exists': '이미 이 이메일로 가입된 계정이 있어요.', 'auth.err.exists': '이미 이 이메일로 가입된 계정이 있어요.',
'auth.err.weak': '비밀번호가 너무 약해요 ({n}자 이상, 영문과 숫자를 섞어 주세요).', 'auth.err.weak': '비밀번호가 너무 약해요 ({n}자 이상, 영문과 숫자를 섞어 주세요).',
'auth.err.pwned': "이 비밀번호는 알려진 데이터 유출에서 발견됐어요. 다른 비밀번호를 선택해 주세요.",
'auth.err.samePassword': '새 비밀번호는 이전 비밀번호와 달라야 해요.', 'auth.err.samePassword': '새 비밀번호는 이전 비밀번호와 달라야 해요.',
'auth.err.emailRate': '요청이 너무 많아요. 몇 분 뒤에 다시 시도해 주세요.', 'auth.err.emailRate': '요청이 너무 많아요. 몇 분 뒤에 다시 시도해 주세요.',
'auth.err.rate': '시도 횟수가 너무 많아요. 몇 분 뒤에 다시 시도해 주세요.', 'auth.err.rate': '시도 횟수가 너무 많아요. 몇 분 뒤에 다시 시도해 주세요.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Bevestig eerst je adres via de link in je e-mail.', '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.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.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.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.emailRate': 'Te veel verzoeken. Probeer het over een paar minuten opnieuw.',
'auth.err.rate': 'Te veel pogingen. Probeer het over een paar minuten opnieuw.', 'auth.err.rate': 'Te veel pogingen. Probeer het over een paar minuten opnieuw.',
+1
View File
@@ -198,6 +198,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Najpierw potwierdź swój adres linkiem z e-maila.', '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.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.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.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.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.', 'auth.err.rate': 'Za dużo prób. Spróbuj ponownie za kilka minut.',
+1
View File
@@ -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.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.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.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.samePassword': 'A nova senha precisa ser diferente da antiga.',
'auth.err.emailRate': 'Muitas solicitações. Tente de novo em alguns minutos.', 'auth.err.emailRate': 'Muitas solicitações. Tente de novo em alguns minutos.',
'auth.err.rate': 'Muitas tentativas. Tente de novo em alguns minutos.', 'auth.err.rate': 'Muitas tentativas. Tente de novo em alguns minutos.',
+1
View File
@@ -198,6 +198,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Сначала подтверди адрес по ссылке из письма.', 'auth.err.notConfirmed': 'Сначала подтверди адрес по ссылке из письма.',
'auth.err.exists': 'Аккаунт с этой почтой уже существует.', 'auth.err.exists': 'Аккаунт с этой почтой уже существует.',
'auth.err.weak': 'Слишком простой пароль (минимум {n} символов, буквы и цифры).', 'auth.err.weak': 'Слишком простой пароль (минимум {n} символов, буквы и цифры).',
'auth.err.pwned': "Этот пароль встречался в известной утечке данных — выбери другой.",
'auth.err.samePassword': 'Новый пароль должен отличаться от старого.', 'auth.err.samePassword': 'Новый пароль должен отличаться от старого.',
'auth.err.emailRate': 'Слишком много запросов. Попробуй через несколько минут.', 'auth.err.emailRate': 'Слишком много запросов. Попробуй через несколько минут.',
'auth.err.rate': 'Слишком много попыток. Попробуй через несколько минут.', 'auth.err.rate': 'Слишком много попыток. Попробуй через несколько минут.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'ยืนยันอีเมลของคุณก่อนด้วยลิงก์ที่เราส่งไปให้', 'auth.err.notConfirmed': 'ยืนยันอีเมลของคุณก่อนด้วยลิงก์ที่เราส่งไปให้',
'auth.err.exists': 'มีบัญชีที่ใช้อีเมลนี้อยู่แล้ว', 'auth.err.exists': 'มีบัญชีที่ใช้อีเมลนี้อยู่แล้ว',
'auth.err.weak': 'รหัสผ่านไม่ปลอดภัยพอ (อย่างน้อย {n} ตัวอักษร ผสมตัวอักษรและตัวเลข)', 'auth.err.weak': 'รหัสผ่านไม่ปลอดภัยพอ (อย่างน้อย {n} ตัวอักษร ผสมตัวอักษรและตัวเลข)',
'auth.err.pwned': "รหัสผ่านนี้เคยหลุดในเหตุข้อมูลรั่วไหลที่ทราบกัน — โปรดเลือกรหัสอื่น",
'auth.err.samePassword': 'รหัสผ่านใหม่ต้องไม่ซ้ำกับรหัสผ่านเดิม', 'auth.err.samePassword': 'รหัสผ่านใหม่ต้องไม่ซ้ำกับรหัสผ่านเดิม',
'auth.err.emailRate': 'ส่งคำขอบ่อยเกินไป ลองใหม่อีกครั้งในอีกไม่กี่นาที', 'auth.err.emailRate': 'ส่งคำขอบ่อยเกินไป ลองใหม่อีกครั้งในอีกไม่กี่นาที',
'auth.err.rate': 'พยายามหลายครั้งเกินไป ลองใหม่อีกครั้งในอีกไม่กี่นาที', 'auth.err.rate': 'พยายามหลายครั้งเกินไป ลองใหม่อีกครั้งในอีกไม่กี่นาที',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': 'Önce e-postayla gelen bağlantıyla adresini onayla.', 'auth.err.notConfirmed': 'Önce e-postayla gelen bağlantıyla adresini onayla.',
'auth.err.exists': 'Bu e-postayla zaten bir hesap var.', '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.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.samePassword': 'Yeni şifren eskisinden farklı olmalı.',
'auth.err.emailRate': 'Çok fazla istek. Birkaç dakika sonra tekrar dene.', 'auth.err.emailRate': 'Çok fazla istek. Birkaç dakika sonra tekrar dene.',
'auth.err.rate': 'Çok fazla deneme. Birkaç dakika sonra tekrar dene.', 'auth.err.rate': 'Çok fazla deneme. Birkaç dakika sonra tekrar dene.',
+1
View File
@@ -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.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.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.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.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.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é.', 'auth.err.rate': 'Quá nhiều lần thử. Thử lại sau vài phút nhé.',
+1
View File
@@ -196,6 +196,7 @@ const dict: Translations = {
'auth.err.notConfirmed': '请先通过邮件里的链接验证你的邮箱。', 'auth.err.notConfirmed': '请先通过邮件里的链接验证你的邮箱。',
'auth.err.exists': '该邮箱已注册账号。', 'auth.err.exists': '该邮箱已注册账号。',
'auth.err.weak': '密码太弱(至少{n}个字符,需混合字母和数字)。', 'auth.err.weak': '密码太弱(至少{n}个字符,需混合字母和数字)。',
'auth.err.pwned': "此密码曾出现在已知的数据泄露中,请换一个。",
'auth.err.samePassword': '新密码不能与旧密码相同。', 'auth.err.samePassword': '新密码不能与旧密码相同。',
'auth.err.emailRate': '请求太频繁了,过几分钟再试吧。', 'auth.err.emailRate': '请求太频繁了,过几分钟再试吧。',
'auth.err.rate': '尝试次数太多,过几分钟再试吧。', 'auth.err.rate': '尝试次数太多,过几分钟再试吧。',
+3
View File
@@ -1,5 +1,6 @@
import { t, type TKey } from '../../i18n' import { t, type TKey } from '../../i18n'
import { SUPABASE_ANON_KEY, SUPABASE_URL } from './config' import { SUPABASE_ANON_KEY, SUPABASE_URL } from './config'
import { isPwnedPassword } from '../pwned'
/** /**
* Connexion aux comptes (Supabase Auth), sans dépendance. * Connexion aux comptes (Supabase Auth), sans dépendance.
@@ -163,6 +164,7 @@ export async function signIn(email: string, password: string): Promise<void> {
/** Inscription. Le pseudo choisi est repris par la base à la création du profil (s'il est libre). */ /** 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<boolean> { export async function signUp(email: string, password: string, username?: string): Promise<boolean> {
if (password.length < PASSWORD_MIN) throw new AuthError(t('auth.err.weak', { n: PASSWORD_MIN })) 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())}`, { const data = await gotrue(`/signup?redirect_to=${encodeURIComponent(appUrl())}`, {
body: { email: cleanEmail(email), password, ...(username ? { data: { username } } : {}) }, body: { email: cleanEmail(email), password, ...(username ? { data: { username } } : {}) },
}) })
@@ -180,6 +182,7 @@ export async function requestPasswordReset(email: string): Promise<void> {
export async function updatePassword(password: string): Promise<void> { export async function updatePassword(password: string): Promise<void> {
if (password.length < PASSWORD_MIN) throw new AuthError(t('auth.err.weak', { n: PASSWORD_MIN })) 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() const token = await getAccessToken()
if (!token) throw new AuthError(t('auth.err.session')) if (!token) throw new AuthError(t('auth.err.session'))
await gotrue('/user', { method: 'PUT', body: { password }, token }) await gotrue('/user', { method: 'PUT', body: { password }, token })
+40
View File
@@ -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<boolean> {
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
}
}
+1 -1
View File
@@ -18,7 +18,7 @@ export const buildCsp = (supabaseUrl = '') => [
"style-src 'self' 'unsafe-inline'", "style-src 'self' 'unsafe-inline'",
`img-src 'self' data: blob: https://image.tmdb.org https://s4.anilist.co${supabaseUrl ? ' ' + supabaseUrl : ''}`, `img-src 'self' data: blob: https://image.tmdb.org https://s4.anilist.co${supabaseUrl ? ' ' + supabaseUrl : ''}`,
"font-src 'self'", "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'", "manifest-src 'self'",
"worker-src 'self'", "worker-src 'self'",
"media-src 'none'", "media-src 'none'",