diff --git a/frontend-modern/src/components/Settings/Settings.tsx b/frontend-modern/src/components/Settings/Settings.tsx index 2d17865eb..fedf13a6c 100644 --- a/frontend-modern/src/components/Settings/Settings.tsx +++ b/frontend-modern/src/components/Settings/Settings.tsx @@ -542,12 +542,17 @@ const Settings: Component = () => { const handleExport = async () => { if (!exportPassphrase()) { - showError(useCustomPassphrase() ? 'Please enter a passphrase' : 'Please enter your password'); + const hasAuth = securityStatus()?.hasAuthentication; + showError(hasAuth + ? (useCustomPassphrase() ? 'Please enter a passphrase' : 'Please enter your password') + : 'Please enter a passphrase'); return; } - if (useCustomPassphrase() && exportPassphrase().length < 12) { - showError('Custom passphrase must be at least 12 characters long'); + // Require 12 chars for custom passphrase or when no auth exists + const hasAuth = securityStatus()?.hasAuthentication; + if ((!hasAuth || useCustomPassphrase()) && exportPassphrase().length < 12) { + showError('Passphrase must be at least 12 characters long'); return; } @@ -1636,7 +1641,11 @@ const Settings: Component = () => { Download an encrypted backup of all nodes and settings