fix(nextcloud-files): IN-03 sichtbare Warnung bei einer http-Adresse
- Einstellungen zeigen bei http:// einen Warnhinweis: Passwoerter und App-Passwoerter gehen unverschluesselt durch das Netz; https bleibt ohne Hinweis - Anleitung Administration nennt die Warnung Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -221,6 +221,14 @@ export function SettingsTab({ onChanged }: { onChanged: () => void }) {
|
||||
setConfirmCount(null);
|
||||
}}
|
||||
/>
|
||||
{/^http:\/\//i.test(address.trim()) && (
|
||||
<p
|
||||
role="status"
|
||||
className="rounded border border-status-warn/40 bg-status-warn/12 px-3 py-2 text-sm text-status-warn-fg"
|
||||
>
|
||||
{t('address.insecure')}
|
||||
</p>
|
||||
)}
|
||||
{!isAdmin && (
|
||||
<p id="nextcloud-files-address-admin-only" className="text-xs text-muted-foreground">
|
||||
{t('address.adminOnly')}
|
||||
|
||||
@@ -287,6 +287,14 @@ describe('SettingsTab', () => {
|
||||
expect(mockSaveSettings).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('eine http-Adresse zeigt eine sichtbare Warnung, https nicht (IN-03)', async () => {
|
||||
const input = await openSettings();
|
||||
await waitFor(() => expect((input as HTMLInputElement).value).toBe('https://cloud.example'));
|
||||
expect(screen.queryByText(/nicht verschlüsselt/)).toBeNull();
|
||||
fireEvent.change(input, { target: { value: 'http://cloud.intern' } });
|
||||
expect(screen.getByText(/nicht verschlüsselt/)).toBeTruthy();
|
||||
});
|
||||
|
||||
it('die Hinweiskarte nennt den Befehl fuer die Ausnahmeliste', async () => {
|
||||
await openSettings();
|
||||
expect(screen.getByText(/occ config:app:set bruteForce whitelist_0/)).toBeTruthy();
|
||||
|
||||
@@ -2391,7 +2391,8 @@
|
||||
"test": "Verbindung prüfen",
|
||||
"testing": "Prüfe …",
|
||||
"connectedUsers": "{count, plural, =0 {Zurzeit ist niemand verbunden.} one {Ein Benutzer ist verbunden.} other {# Benutzer sind verbunden.}}",
|
||||
"adminOnly": "Die Adresse legt ein Administrator fest. Sie können sie hier ansehen und die Verbindung prüfen."
|
||||
"adminOnly": "Die Adresse legt ein Administrator fest. Sie können sie hier ansehen und die Verbindung prüfen.",
|
||||
"insecure": "Achtung: Mit http:// gehen Passwörter nicht verschlüsselt durch das Netz, auch das Nextcloud-Passwort, das Benutzer beim Anmelden eingeben. Verwenden Sie nach Möglichkeit https://."
|
||||
},
|
||||
"reconnect": {
|
||||
"message": "{count, plural, one {Ein Benutzer ist verbunden. Nach dem Wechsel muss er sich neu anmelden.} other {# Benutzer sind verbunden. Nach dem Wechsel müssen sich alle neu anmelden.}}",
|
||||
|
||||
@@ -2391,7 +2391,8 @@
|
||||
"test": "Check connection",
|
||||
"testing": "Checking …",
|
||||
"connectedUsers": "{count, plural, =0 {Nobody is connected right now.} one {One user is connected.} other {# users are connected.}}",
|
||||
"adminOnly": "The address is set by an administrator. You can view it here and check the connection."
|
||||
"adminOnly": "The address is set by an administrator. You can view it here and check the connection.",
|
||||
"insecure": "Caution: with http://, passwords travel across the network unencrypted, including the Nextcloud password users enter when signing in. Use https:// whenever possible."
|
||||
},
|
||||
"reconnect": {
|
||||
"message": "{count, plural, one {One user is connected. After the change they have to sign in again.} other {# users are connected. After the change everyone has to sign in again.}}",
|
||||
|
||||
Reference in New Issue
Block a user