Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

security: Fix XSS vulnerability in authentication check-code pages (#23295)

yyh54c8bd29ee35
diff --git a/web/__tests__/xss-fix-verification.test.tsx b/web/__tests__/xss-fix-verification.test.tsx
new file mode 100644
index 00000000000..2fa5ab3c05f
--- /dev/null
+++ b/web/__tests__/xss-fix-verification.test.tsx
@@ -0,0 +1,212 @@
+/**
+ * XSS Fix Verification Test
+ *
+ * This test verifies that the XSS vulnerability in check-code pages has been
+ * properly fixed by replacing dangerouslySetInnerHTML with safe React rendering.
+ */
+
+import React from 'react'
+import { cleanup, render } from '@testing-library/react'
+import '@testing-library/jest-dom'
+
+// Mock i18next with the new safe translation structure
+jest.mock('react-i18next', () => ({
+ useTranslation: () => ({
+ t: (key: string) => {
+ if (key === 'login.checkCode.tipsPrefix')
+ return 'We send a verification code to '
+
+ return key
+ },
+ }),
+}))
+
+// Mock Next.js useSearchParams
+jest.mock('next/navigation', () => ({
+ useSearchParams: () => ({
+ get: (key: string) => {
+ if (key === 'email')
+ return '[email protected]<script>alert("XSS")</script>'
+ return null
+ },
+ }),
+}))
+
+// Fixed CheckCode component implementation (current secure version)
+const SecureCheckCodeComponent = ({ email }: { email: string }) => {
+ const { t } = require('react-i18next').useTranslation()
+
+ return (
+ <div>
+ <h1>Check Code</h1>
+ <p>
+ <span>
+ {t('login.checkCode.tipsPrefix')}
+ <strong>{email}</strong>
+ </span>
+ </p>
+ </div>
+ )
+}
+
+// Vulnerable implementation for comparison (what we fixed)
+const VulnerableCheckCodeComponent = ({ email }: { email: string }) => {
+ const mockTranslation = (key: string, params?: any) => {
+ if (key === 'login.checkCode.tips' && params?.email)
+ return `We send a verification code to <strong>${params.email}</strong>`
+
+ return key
+ }
+
+ return (
+ <div>
+ <h1>Check Code</h1>
+ <p>
+ <span dangerouslySetInnerHTML={{ __html: mockTranslation('login.checkCode.tips', { email }) }}></span>
+ </p>
+ </div>
+ )
+}
+
+describe('XSS Fix Verification - Check Code Pages Security', () => {
+ afterEach(() => {
+ cleanup()
+ })
+
+ const maliciousEmail = '[email protected]<script>alert("XSS")</script>'
+
+ it('should securely render email with HTML characters as text (FIXED VERSION)', () => {
+ console.log('\n🔒 Security Fix Verification Report')
+ console.log('===================================')
+
+ const { container } = render(<SecureCheckCodeComponent email={maliciousEmail} />)
+
+ const spanElement = container.querySelector('span')
+ const strongElement = container.querySelector('strong')
+ const scriptElements = container.querySelectorAll('script')
+
+ console.log('\n✅ Fixed Implementation Results:')
+ console.log('- Email rendered in strong tag:', strongElement?.textContent)
+ console.log('- HTML tags visible as text:', strongElement?.textContent?.includes('<script>'))
+ console.log('- Script elements created:', scriptElements.length)
+ console.log('- Full text content:', spanElement?.textContent)
+
+ // Verify secure behavior
+ expect(strongElement?.textContent).toBe(maliciousEmail) // Email rendered as text
+ expect(strongElement?.textContent).toContain('<script>') // HTML visible as text
+ expect(scriptElements).toHaveLength(0) // No script elements created
+ expect(spanElement?.textContent).toBe(`We send a verification code to ${maliciousEmail}`)
+
+ console.log('\n🎯 Security Status: SECURE - HTML automatically escaped by React')
+ })
+
+ it('should demonstrate the vulnerability that was fixed (VULNERABLE VERSION)', () => {
+ const { container } = render(<VulnerableCheckCodeComponent email={maliciousEmail} />)
+
+ const spanElement = container.querySelector('span')
+ const strongElement = container.querySelector('strong')
+ const scriptElements = container.querySelectorAll('script')
+
+ console.log('\n⚠️ Previous Vulnerable Implementation:')
+ console.log('- HTML content:', spanElement?.innerHTML)
+ console.log('- Strong element text:', strongElement?.textContent)
+ console.log('- Script elements created:', scriptElements.length)
+ console.log('- Script content:', scriptElements[0]?.textContent)
+
+ // Verify vulnerability exists in old implementation
+ expect(scriptElements).toHaveLength(1) // Script element was created
+ expect(scriptElements[0]?.textContent).toBe('alert("XSS")') // Contains malicious code
+ expect(spanElement?.innerHTML).toContain('<script>') // Raw HTML in DOM
+
+ console.log('\n❌ Security Status: VULNERABLE - dangerouslySetInnerHTML creates script elements')
+ })
+
+ it('should verify all affected components use the secure pattern', () => {
+ console.log('\n📋 Component Security Audit')
+ console.log('============================')
+
+ // Test multiple malicious inputs
+ const testCases = [
+ '[email protected]<img src=x onerror=alert(1)>',
+ '[email protected]<div onclick="alert(2)">click</div>',
+ '[email protected]<script>document.cookie="stolen"</script>',
+ ]
+
+ testCases.forEach((testEmail, index) => {
+ const { container } = render(<SecureCheckCodeComponent email={testEmail} />)
+
+ const strongElement = container.querySelector('strong')
+ const scriptElements = container.querySelectorAll('script')
+ const imgElements = container.querySelectorAll('img')
+ const divElements = container.querySelectorAll('div:not([data-testid])')
+
+ console.log(`\n📧 Test Case ${index + 1}: ${testEmail.substring(0, 20)}...`)
+ console.log(` - Script elements: ${scriptElements.length}`)
+ console.log(` - Img elements: ${imgElements.length}`)
+ console.log(` - Malicious divs: ${divElements.length - 1}`) // -1 for container div
+ console.log(` - Text content: ${strongElement?.textContent === testEmail ? 'SAFE' : 'ISSUE'}`)
+
+ // All should be safe
+ expect(scriptElements).toHaveLength(0)
+ expect(imgElements).toHaveLength(0)
+ expect(strongElement?.textContent).toBe(testEmail)
+ })
+
+ console.log('\n✅ All test cases passed - secure rendering confirmed')
+ })
+
+ it('should validate the translation structure is secure', () => {
+ console.log('\n🔍 Translation Security Analysis')
+ console.log('=================================')
+
+ const { t } = require('react-i18next').useTranslation()
+ const prefix = t('login.checkCode.tipsPrefix')
+
+ console.log('- Translation key used: login.checkCode.tipsPrefix')
+ console.log('- Translation value:', prefix)
+ console.log('- Contains HTML tags:', prefix.includes('<'))
+ console.log('- Pure text content:', !prefix.includes('<') && !prefix.includes('>'))
+
+ // Verify translation is plain text
+ expect(prefix).toBe('We send a verification code to ')
+ expect(prefix).not.toContain('<')
+ expect(prefix).not.toContain('>')
+ expect(typeof prefix).toBe('string')
+
+ console.log('\n✅ Translation structure is secure - no HTML content')
+ })
+
+ it('should confirm React automatic escaping works correctly', () => {
+ console.log('\n⚡ React Security Mechanism Test')
+ console.log('=================================')
+
+ // Test React's automatic escaping with various inputs
+ const dangerousInputs = [
+ '<script>alert("xss")</script>',
+ '<img src="x" onerror="alert(1)">',
+ '"><script>alert(2)</script>',
+ '\'>alert(3)</script>',
+ '<div onclick="alert(4)">click</div>',
+ ]
+
+ dangerousInputs.forEach((input, index) => {
+ const TestComponent = () => <strong>{input}</strong>
+ const { container } = render(<TestComponent />)
+
+ const strongElement = container.querySelector('strong')
+ const scriptElements = container.querySelectorAll('script')
+
+ console.log(`\n🧪 Input ${index + 1}: ${input.substring(0, 30)}...`)
+ console.log(` - Rendered as text: ${strongElement?.textContent === input}`)
+ console.log(` - No script execution: ${scriptElements.length === 0}`)
+
+ expect(strongElement?.textContent).toBe(input)
+ expect(scriptElements).toHaveLength(0)
+ })
+
+ console.log('\n🛡️ React automatic escaping is working perfectly')
+ })
+})
+
+export {}
diff --git a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx
index da754794b1a..91e10216108 100644
--- a/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx
+++ b/web/app/(shareLayout)/webapp-reset-password/check-code/page.tsx
@@ -70,7 +70,10 @@ export default function CheckCode() {
<div className='pb-4 pt-2'>
<h2 className='title-4xl-semi-bold text-text-primary'>{t('login.checkCode.checkYourEmail')}</h2>
<p className='body-md-regular mt-2 text-text-secondary'>
- <span dangerouslySetInnerHTML={{ __html: t('login.checkCode.tips', { email }) as string }}></span>
+ <span>
+ {t('login.checkCode.tipsPrefix')}
+ <strong>{email}</strong>
+ </span>
<br />
{t('login.checkCode.validTime')}
</p>
diff --git a/web/app/(shareLayout)/webapp-signin/check-code/page.tsx b/web/app/(shareLayout)/webapp-signin/check-code/page.tsx
index a2ba620ace8..c80a006583a 100644
--- a/web/app/(shareLayout)/webapp-signin/check-code/page.tsx
+++ b/web/app/(shareLayout)/webapp-signin/check-code/page.tsx
@@ -93,7 +93,10 @@ export default function CheckCode() {
<div className='pb-4 pt-2'>
<h2 className='title-4xl-semi-bold text-text-primary'>{t('login.checkCode.checkYourEmail')}</h2>
<p className='body-md-regular mt-2 text-text-secondary'>
- <span dangerouslySetInnerHTML={{ __html: t('login.checkCode.tips', { email }) as string }}></span>
+ <span>
+ {t('login.checkCode.tipsPrefix')}
+ <strong>{email}</strong>
+ </span>
<br />
{t('login.checkCode.validTime')}
</p>
diff --git a/web/app/reset-password/check-code/page.tsx b/web/app/reset-password/check-code/page.tsx
index 480b5131122..a2dfda1e5fb 100644
--- a/web/app/reset-password/check-code/page.tsx
+++ b/web/app/reset-password/check-code/page.tsx
@@ -70,7 +70,10 @@ export default function CheckCode() {
<div className='pb-4 pt-2'>
<h2 className='title-4xl-semi-bold text-text-primary'>{t('login.checkCode.checkYourEmail')}</h2>
<p className='body-md-regular mt-2 text-text-secondary'>
- <span dangerouslySetInnerHTML={{ __html: t('login.checkCode.tips', { email }) as string }}></span>
+ <span>
+ {t('login.checkCode.tipsPrefix')}
+ <strong>{email}</strong>
+ </span>
<br />
{t('login.checkCode.validTime')}
</p>
diff --git a/web/app/signin/check-code/page.tsx b/web/app/signin/check-code/page.tsx
index 912df62f1dd..9c3f7768f84 100644
--- a/web/app/signin/check-code/page.tsx
+++ b/web/app/signin/check-code/page.tsx
@@ -71,7 +71,10 @@ export default function CheckCode() {
<div className='pb-4 pt-2'>
<h2 className='title-4xl-semi-bold text-text-primary'>{t('login.checkCode.checkYourEmail')}</h2>
<p className='body-md-regular mt-2 text-text-secondary'>
- <span dangerouslySetInnerHTML={{ __html: t('login.checkCode.tips', { email }) as string }}></span>
+ <span>
+ {t('login.checkCode.tipsPrefix')}
+ <strong>{email}</strong>
+ </span>
<br />
{t('login.checkCode.validTime')}
</p>
diff --git a/web/i18n/de-DE/login.ts b/web/i18n/de-DE/login.ts
index 7ef0e2420a2..ef87f05f796 100644
--- a/web/i18n/de-DE/login.ts
+++ b/web/i18n/de-DE/login.ts
@@ -79,9 +79,9 @@ const translation = {
useAnotherMethod: 'Verwenden Sie eine andere Methode',
validTime: 'Beachten Sie, dass der Code 5 Minuten lang gültig ist',
emptyCode: 'Code ist erforderlich',
- tips: 'Wir senden einen Verifizierungscode an <strong>{{email}}</strong>',
invalidCode: 'Ungültiger Code',
resend: 'Wieder senden',
+ tipsPrefix: 'Wir senden einen Bestätigungscode an',
},
or: 'ODER',
back: 'Zurück',
diff --git a/web/i18n/en-US/login.ts b/web/i18n/en-US/login.ts
index d47eb7c079d..a00e73b9013 100644
--- a/web/i18n/en-US/login.ts
+++ b/web/i18n/en-US/login.ts
@@ -79,7 +79,7 @@ const translation = {
validate: 'Validate',
checkCode: {
checkYourEmail: 'Check your email',
- tips: 'We send a verification code to <strong>{{email}}</strong>',
+ tipsPrefix: 'We send a verification code to ',
validTime: 'Bear in mind that the code is valid for 5 minutes',
verificationCode: 'Verification code',
verificationCodePlaceholder: 'Enter 6-digit code',
diff --git a/web/i18n/es-ES/login.ts b/web/i18n/es-ES/login.ts
index fda14f37087..8fd82ecb85c 100644
--- a/web/i18n/es-ES/login.ts
+++ b/web/i18n/es-ES/login.ts
@@ -78,10 +78,10 @@ const translation = {
emptyCode: 'Se requiere código',
useAnotherMethod: 'Usar otro método',
resend: 'Reenviar',
- tips: 'Enviamos un código de verificación a <strong>{{email}}</strong>',
verificationCode: 'Código de verificación',
validTime: 'Ten en cuenta que el código es válido durante 5 minutos',
invalidCode: 'Código no válido',
+ tipsPrefix: 'Enviamos un código de verificación a',
},
or: 'O',
back: 'Atrás',
diff --git a/web/i18n/fa-IR/login.ts b/web/i18n/fa-IR/login.ts
index da2e5197eb3..2b6098b95e3 100644
--- a/web/i18n/fa-IR/login.ts
+++ b/web/i18n/fa-IR/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'نام کاربری شما',
forget: 'رمز عبور خود را فراموش کرده‌اید؟',
signBtn: 'ورود',
- sso: 'ادامه با SSO',
installBtn: 'راه‌اندازی',
setAdminAccount: 'راه‌اندازی حساب مدیر',
setAdminAccountDesc: 'بیشترین امتیازات برای حساب مدیر، که می‌تواند برای ایجاد برنامه‌ها و مدیریت ارائه‌دهندگان LLM و غیره استفاده شود.',
@@ -81,8 +80,8 @@ const translation = {
useAnotherMethod: 'از روش دیگری استفاده کنید',
checkYourEmail: 'ایمیل خود را بررسی کنید',
validTime: 'به خاطر داشته باشید که کد 5 دقیقه اعتبار دارد',
- tips: 'کد درستی سنجی را به <strong>{{email}}</strong> ارسال می کنیم',
resend: 'ارسال مجدد',
+ tipsPrefix: 'ما یک کد تأیید می‌فرستیم به ',
},
or: 'یا',
back: 'بازگشت',
diff --git a/web/i18n/fr-FR/login.ts b/web/i18n/fr-FR/login.ts
index 9e718cad2dc..38b8159158c 100644
--- a/web/i18n/fr-FR/login.ts
+++ b/web/i18n/fr-FR/login.ts
@@ -70,7 +70,6 @@ const translation = {
activated: 'Connectez-vous maintenant',
adminInitPassword: 'Mot de passe d\'initialisation de l\'administrateur',
validate: 'Valider',
- sso: 'Poursuivre avec l’authentification unique',
checkCode: {
verificationCode: 'Code de vérification',
useAnotherMethod: 'Utiliser une autre méthode',
@@ -82,7 +81,7 @@ const translation = {
invalidCode: 'Code non valide',
checkYourEmail: 'Vérifiez vos e-mails',
validTime: 'Gardez à l’esprit que le code est valable 5 minutes',
- tips: 'Nous envoyons un code de vérification à <strong>{{email}}</strong>',
+ tipsPrefix: 'Nous envoyons un code de vérification à',
},
sendVerificationCode: 'Envoyer le code de vérification',
or: 'OU',
diff --git a/web/i18n/hi-IN/login.ts b/web/i18n/hi-IN/login.ts
index 06019042b50..e89cea327a8 100644
--- a/web/i18n/hi-IN/login.ts
+++ b/web/i18n/hi-IN/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'आपका उपयोगकर्ता नाम',
forget: 'क्या आप पासवर्ड भूल गए?',
signBtn: 'साइन इन करें',
- sso: 'SSO के साथ जारी रखें',
installBtn: 'सेट अप करें',
setAdminAccount: 'एडमिन खाता सेट कर रहे हैं',
setAdminAccountDesc:
@@ -86,8 +85,8 @@ const translation = {
resend: 'भेजें',
checkYourEmail: 'अपना ईमेल जांचें',
validTime: 'ध्यान रखें कि कोड 5 मिनट के लिए वैध है',
- tips: 'हम <strong>{{email}}</strong> को एक सत्यापन कोड भेजते हैं',
verificationCodePlaceholder: '6-अंक कोड दर्ज करें',
+ tipsPrefix: 'हम एक सत्यापन कोड भेजते हैं',
},
sendVerificationCode: 'पुष्टि कोड भेजें',
or: 'नहीं तो',
diff --git a/web/i18n/it-IT/login.ts b/web/i18n/it-IT/login.ts
index 47ae79bdd92..5009f995199 100644
--- a/web/i18n/it-IT/login.ts
+++ b/web/i18n/it-IT/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'Il tuo nome utente',
forget: 'Hai dimenticato la password?',
signBtn: 'Accedi',
- sso: 'Continua con SSO',
installBtn: 'Configura',
setAdminAccount: 'Impostazione di un account amministratore',
setAdminAccountDesc:
@@ -91,8 +90,8 @@ const translation = {
validTime: 'Tieni presente che il codice è valido per 5 minuti',
didNotReceiveCode: 'Non hai ricevuto il codice?',
checkYourEmail: 'Controlla la tua email',
- tips: 'Inviamo un codice di verifica a <strong>{{email}}</strong>',
useAnotherMethod: 'Usa un altro metodo',
+ tipsPrefix: 'Inviamo un codice di verifica a',
},
or: 'O',
back: 'Indietro',
diff --git a/web/i18n/ja-JP/login.ts b/web/i18n/ja-JP/login.ts
index 833bedf7197..7c116c4c18f 100644
--- a/web/i18n/ja-JP/login.ts
+++ b/web/i18n/ja-JP/login.ts
@@ -78,10 +78,10 @@ const translation = {
didNotReceiveCode: 'コードが届きませんか?',
resend: '再送',
verificationCode: '認証コード',
- tips: '<strong>確認コードを{{email}}に送信します。</strong>',
validTime: 'コードは 5 分間有効であることに注意してください',
emptyCode: 'コードが必要です',
checkYourEmail: 'メールをチェックしてください',
+ tipsPrefix: '私たちは確認コードを送信します',
},
useVerificationCode: '確認コードを使用する',
or: '又は',
diff --git a/web/i18n/ko-KR/login.ts b/web/i18n/ko-KR/login.ts
index 51b68967c24..b050d4b9f59 100644
--- a/web/i18n/ko-KR/login.ts
+++ b/web/i18n/ko-KR/login.ts
@@ -73,7 +73,6 @@ const translation = {
checkCode: {
verify: '확인',
verificationCode: '인증 코드',
- tips: '<strong>{{email}}</strong>로 인증 코드를 보내드립니다.',
validTime: '코드는 5 분 동안 유효합니다',
checkYourEmail: '이메일 주소 확인',
invalidCode: '유효하지 않은 코드',
@@ -82,6 +81,7 @@ const translation = {
useAnotherMethod: '다른 방법 사용',
didNotReceiveCode: '코드를 받지 못하셨나요?',
resend: '재전송',
+ tipsPrefix: '우리는 확인 코드를 보냅니다',
},
back: '뒤로',
or: '또는',
diff --git a/web/i18n/pl-PL/login.ts b/web/i18n/pl-PL/login.ts
index 8b63fec502b..909d1a431f3 100644
--- a/web/i18n/pl-PL/login.ts
+++ b/web/i18n/pl-PL/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'Twoja nazwa użytkownika',
forget: 'Zapomniałeś hasła?',
signBtn: 'Zaloguj się',
- sso: 'Kontynuuj za pomocą SSO',
installBtn: 'Ustaw',
setAdminAccount: 'Ustawianie konta administratora',
setAdminAccountDesc:
@@ -86,8 +85,8 @@ const translation = {
useAnotherMethod: 'Użyj innej metody',
didNotReceiveCode: 'Nie otrzymałeś kodu?',
verificationCode: 'Kod weryfikacyjny',
- tips: 'Wysyłamy kod weryfikacyjny na <strong>adres {{email}}</strong>',
emptyCode: 'Kod jest wymagany',
+ tipsPrefix: 'Wysyłamy kod weryfikacyjny do',
},
continueWithCode: 'Kontynuuj z kodem',
setYourAccount: 'Ustaw swoje konto',
diff --git a/web/i18n/pt-BR/login.ts b/web/i18n/pt-BR/login.ts
index 290cd3c8b4a..150df678d9c 100644
--- a/web/i18n/pt-BR/login.ts
+++ b/web/i18n/pt-BR/login.ts
@@ -70,19 +70,18 @@ const translation = {
activated: 'Entrar agora',
adminInitPassword: 'Senha de inicialização do administrador',
validate: 'Validar',
- sso: 'Continuar com SSO',
checkCode: {
useAnotherMethod: 'Use outro método',
invalidCode: 'Código inválido',
verificationCodePlaceholder: 'Digite o código de 6 dígitos',
checkYourEmail: 'Verifique seu e-mail',
- tips: 'Enviamos um código de verificação para <strong>{{email}}</strong>',
emptyCode: 'O código é necessário',
verify: 'Verificar',
verificationCode: 'Código de verificação',
resend: 'Reenviar',
didNotReceiveCode: 'Não recebeu o código?',
validTime: 'Lembre-se de que o código é válido por 5 minutos',
+ tipsPrefix: 'Enviamos um código de verificação para',
},
resetPassword: 'Redefinir senha',
or: 'OU',
diff --git a/web/i18n/ro-RO/login.ts b/web/i18n/ro-RO/login.ts
index 342010a10e7..ca1b1d4e010 100644
--- a/web/i18n/ro-RO/login.ts
+++ b/web/i18n/ro-RO/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'Numele tău de utilizator',
forget: 'Ai uitat parola?',
signBtn: 'Autentificare',
- sso: 'Continuă cu SSO',
installBtn: 'Configurare',
setAdminAccount: 'Configurare cont de administrator',
setAdminAccountDesc: 'Privilegii maxime pentru contul de administrator, care poate fi utilizat pentru crearea de aplicații și gestionarea furnizorilor LLM, etc.',
@@ -80,9 +79,9 @@ const translation = {
verificationCodePlaceholder: 'Introduceți codul din 6 cifre',
emptyCode: 'Codul este necesar',
verify: 'Verifica',
- tips: 'Trimitem un cod de verificare la <strong>{{email}}</strong>',
useAnotherMethod: 'Utilizați o altă metodă',
resend: 'Retrimite',
+ tipsPrefix: 'Trimitem un cod de verificare la',
},
usePassword: 'Utilizați parola',
useVerificationCode: 'Utilizarea codului de verificare',
diff --git a/web/i18n/ru-RU/login.ts b/web/i18n/ru-RU/login.ts
index 38e45590126..874b0aef0b8 100644
--- a/web/i18n/ru-RU/login.ts
+++ b/web/i18n/ru-RU/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'Ваше имя пользователя',
forget: 'Забыли пароль?',
signBtn: 'Войти',
- sso: 'Продолжить с SSO',
installBtn: 'Настроить',
setAdminAccount: 'Настройка учетной записи администратора',
setAdminAccountDesc: 'Максимальные привилегии для учетной записи администратора, которые можно использовать для создания приложений, управления поставщиками LLM и т. д.',
@@ -79,10 +78,10 @@ const translation = {
emptyCode: 'Код обязателен для заполнения',
verificationCode: 'Проверочный код',
checkYourEmail: 'Проверьте свою электронную почту',
- tips: 'Мы отправляем код подтверждения на <strong>{{email}}</strong>',
validTime: 'Имейте в виду, что код действителен в течение 5 минут',
verificationCodePlaceholder: 'Введите 6-значный код',
useAnotherMethod: 'Используйте другой метод',
+ tipsPrefix: 'Мы отправляем код проверки на',
},
back: 'Назад',
changePasswordBtn: 'Установите пароль',
diff --git a/web/i18n/sl-SI/login.ts b/web/i18n/sl-SI/login.ts
index 479b8b92219..acb6aba2c69 100644
--- a/web/i18n/sl-SI/login.ts
+++ b/web/i18n/sl-SI/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'Vaše uporabniško ime',
forget: 'Ste pozabili geslo?',
signBtn: 'Prijava',
- sso: 'Nadaljujte z SSO',
installBtn: 'Namesti',
setAdminAccount: 'Nastavitev administratorskega računa',
setAdminAccountDesc: 'Najvišje pravice za administratorski račun, ki se lahko uporablja za ustvarjanje aplikacij in upravljanje LLM ponudnikov itd.',
@@ -76,13 +75,13 @@ const translation = {
verificationCodePlaceholder: 'Vnesite 6-mestno kodo',
resend: 'Poslati',
verificationCode: 'Koda za preverjanje',
- tips: 'Kodo za preverjanje pošljemo na <strong>{{email}}</strong>',
verify: 'Preveriti',
validTime: 'Upoštevajte, da je koda veljavna 5 minut',
checkYourEmail: 'Preverjanje e-pošte',
didNotReceiveCode: 'Niste prejeli kode?',
invalidCode: 'Neveljavna koda',
useAnotherMethod: 'Uporabite drug način',
+ tipsPrefix: 'Pošljemo kodo za preverjanje na',
},
useVerificationCode: 'Uporaba kode za preverjanje',
licenseInactive: 'Licenca je neaktivna',
diff --git a/web/i18n/th-TH/login.ts b/web/i18n/th-TH/login.ts
index 3db8da4da8b..621b9999a02 100644
--- a/web/i18n/th-TH/login.ts
+++ b/web/i18n/th-TH/login.ts
@@ -79,7 +79,6 @@ const translation = {
validate: 'ตรวจ สอบ',
checkCode: {
checkYourEmail: 'ตรวจสอบอีเมลของคุณ',
- tips: 'เราส่งรหัสยืนยันไปที่ <strong>{{email}}</strong>',
validTime: 'โปรดทราบว่ารหัสนี้ใช้ได้นาน 5 นาที',
verificationCode: 'รหัสยืนยัน',
verificationCodePlaceholder: 'ป้อนรหัส 6 หลัก',
@@ -89,6 +88,7 @@ const translation = {
useAnotherMethod: 'ใช้วิธีอื่น',
emptyCode: 'ต้องใช้รหัส',
invalidCode: 'รหัสไม่ถูกต้อง',
+ tipsPrefix: 'เราส่งรหัสตรวจสอบไปยัง',
},
resetPassword: 'รีเซ็ตรหัสผ่าน',
resetPasswordDesc: 'พิมพ์อีเมลที่คุณใช้ลงทะเบียนบน Dify แล้วเราจะส่งอีเมลรีเซ็ตรหัสผ่านให้คุณ',
diff --git a/web/i18n/tr-TR/login.ts b/web/i18n/tr-TR/login.ts
index b525dd0dd77..96832ae5815 100644
--- a/web/i18n/tr-TR/login.ts
+++ b/web/i18n/tr-TR/login.ts
@@ -9,7 +9,6 @@ const translation = {
namePlaceholder: 'Kullanıcı adınız',
forget: 'Şifrenizi mi unuttunuz?',
signBtn: 'Giriş yap',
- sso: 'SSO ile devam et',
installBtn: 'Kurulum',
setAdminAccount: 'Yönetici hesabı ayarlama',
setAdminAccountDesc: 'Yönetici hesabı için maksimum ayrıcalıklar, uygulama oluşturma ve LLM sağlayıcılarını yönetme gibi işlemler için kullanılabilir.',
@@ -81,8 +80,8 @@ const translation = {
verificationCodePlaceholder: '6 haneli kodu girin',
useAnotherMethod: 'Başka bir yöntem kullanın',
didNotReceiveCode: 'Kodu almadınız mı?',
- tips: '<strong>{{email}}</strong> adresine bir doğrulama kodu gönderiyoruz',
resend: 'Tekrar Gönder',
+ tipsPrefix: 'Bir doğrulama kodu gönderiyoruz',
},
enterYourName: 'Lütfen kullanıcı adınızı giriniz',
resetPassword: 'Şifre Sıfırlama',
diff --git a/web/i18n/uk-UA/login.ts b/web/i18n/uk-UA/login.ts
index b586f3f2433..a6b8d725e86 100644
--- a/web/i18n/uk-UA/login.ts
+++ b/web/i18n/uk-UA/login.ts
@@ -70,7 +70,6 @@ const translation = {
activated: 'Увійти зараз',
adminInitPassword: 'Пароль ініціалізації адміністратора',
validate: 'Перевірити',
- sso: 'Продовжуйте працювати з SSW',
checkCode: {
didNotReceiveCode: 'Не отримали код?',
invalidCode: 'Невірний код',
@@ -81,8 +80,8 @@ const translation = {
verify: 'Перевірити',
verificationCode: 'Код підтвердження',
useAnotherMethod: 'Використовуйте інший спосіб',
- tips: 'Ми надсилаємо код підтвердження на <strong>адресу {{email}}</strong>',
validTime: 'Майте на увазі, що код дійсний протягом 5 хвилин',
+ tipsPrefix: 'Ми відправляємо код підтвердження на',
},
back: 'Задній',
backToLogin: 'Назад до входу',
diff --git a/web/i18n/vi-VN/login.ts b/web/i18n/vi-VN/login.ts
index 520d5250a85..1e770402dda 100644
--- a/web/i18n/vi-VN/login.ts
+++ b/web/i18n/vi-VN/login.ts
@@ -70,7 +70,6 @@ const translation = {
activated: 'Đăng nhập ngay',
adminInitPassword: 'Mật khẩu khởi tạo quản trị viên',
validate: 'Xác thực',
- sso: 'Tiếp tục với SSO',
checkCode: {
checkYourEmail: 'Kiểm tra email của bạn',
verify: 'Xác minh',
@@ -82,7 +81,7 @@ const translation = {
useAnotherMethod: 'Sử dụng phương pháp khác',
emptyCode: 'Mã là bắt buộc',
verificationCodePlaceholder: 'Nhập mã gồm 6 chữ số',
- tips: 'Chúng tôi gửi mã xác minh đến <strong>{{email}}</strong>',
+ tipsPrefix: 'Chúng tôi gửi mã xác minh đến',
},
back: 'Lưng',
withSSO: 'Tiếp tục với SSO',
diff --git a/web/i18n/zh-Hans/login.ts b/web/i18n/zh-Hans/login.ts
index 2276436d0e2..d0b2cbe8c52 100644
--- a/web/i18n/zh-Hans/login.ts
+++ b/web/i18n/zh-Hans/login.ts
@@ -79,7 +79,6 @@ const translation = {
validate: '验证',
checkCode: {
checkYourEmail: '验证您的电子邮件',
- tips: '验证码已经发送到您的邮箱 <strong>{{email}}</strong>',
validTime: '请注意验证码 5 分钟内有效',
verificationCode: '验证码',
verificationCodePlaceholder: '输入 6 位验证码',
@@ -89,6 +88,7 @@ const translation = {
useAnotherMethod: '使用其他方式登录',
emptyCode: '验证码不能为空',
invalidCode: '验证码无效',
+ tipsPrefix: '我们发送一个验证码到',
},
resetPassword: '重置密码',
resetPasswordDesc: '请输入您的电子邮件地址以重置密码。我们将向您发送一封电子邮件。',
diff --git a/web/i18n/zh-Hant/login.ts b/web/i18n/zh-Hant/login.ts
index 81873232761..64f81228574 100644
--- a/web/i18n/zh-Hant/login.ts
+++ b/web/i18n/zh-Hant/login.ts
@@ -76,12 +76,12 @@ const translation = {
didNotReceiveCode: '沒有收到驗證碼?',
emptyCode: '驗證碼是必需的',
checkYourEmail: '檢查您的電子郵件',
- tips: '我們將驗證碼發送到 <strong>{{email}}</strong>',
verificationCodePlaceholder: '輸入 6 位代碼',
useAnotherMethod: '使用其他方法',
validTime: '請記住,該代碼的有效期為 5 分鐘',
verificationCode: '驗證碼',
invalidCode: '無效代碼',
+ tipsPrefix: '我們發送一個驗證碼到',
},
continueWithCode: 'Continue With Code',
or: '或',