mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-18 06:23:18 +00:00
fix(security): harden encryption key permissions, increase password minimum, remove sensitive logs (#323)
Self-heal encryption key file permissions to 0600 on startup. Increase minimum password length from 6 to 8 characters per NIST SP 800-63B. Remove console.log statements that exposed file paths, .env locations, stack names, and admin usernames to stdout.
This commit is contained in:
@@ -175,8 +175,8 @@ export function SettingsModal({ isOpen, onClose }: SettingsModalProps) {
|
||||
toast.error('New passwords do not match');
|
||||
return;
|
||||
}
|
||||
if (authData.newPassword.length < 6) {
|
||||
toast.error('New password must be at least 6 characters');
|
||||
if (authData.newPassword.length < 8) {
|
||||
toast.error('New password must be at least 8 characters');
|
||||
return;
|
||||
}
|
||||
setIsSavingPassword(true);
|
||||
|
||||
@@ -35,8 +35,8 @@ export function Setup({
|
||||
return;
|
||||
}
|
||||
|
||||
if (password.length < 6) {
|
||||
setError('Password must be at least 6 characters');
|
||||
if (password.length < 8) {
|
||||
setError('Password must be at least 8 characters');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ export function UsersSection() {
|
||||
toast.error('Password is required for new users.');
|
||||
return;
|
||||
}
|
||||
if (formPassword && formPassword.length < 6) {
|
||||
toast.error('Password must be at least 6 characters.');
|
||||
if (formPassword && formPassword.length < 8) {
|
||||
toast.error('Password must be at least 8 characters.');
|
||||
return;
|
||||
}
|
||||
if (formPassword && formPassword !== formConfirmPassword) {
|
||||
@@ -283,7 +283,7 @@ export function UsersSection() {
|
||||
type="password"
|
||||
value={formPassword}
|
||||
onChange={(e) => setFormPassword(e.target.value)}
|
||||
placeholder={editingUser ? 'Leave blank to keep' : 'min. 6 characters'}
|
||||
placeholder={editingUser ? 'Leave blank to keep' : 'min. 8 characters'}
|
||||
/>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
|
||||
Reference in New Issue
Block a user