fix: harden residual route and restore checks
This commit is contained in:
@@ -2,6 +2,7 @@ import { expect, test } from 'bun:test';
|
||||
import {
|
||||
parseRestoreMarkerPhase,
|
||||
RESTORE_MARKER_CONFIRMATION,
|
||||
SYNTHETIC_CHARACTER_ID_MIN,
|
||||
validateRestoreMarkerTarget,
|
||||
validateRestoreMarkerWrite,
|
||||
} from '../src/lib/server/restore-marker';
|
||||
@@ -16,6 +17,7 @@ test('restore marker rejects non-loopback targets before any backend call', () =
|
||||
expect(() => validateRestoreMarkerTarget('https://production.example.test')).toThrow('loopback');
|
||||
expect(() => validateRestoreMarkerTarget('http://192.0.2.10:3210')).toThrow('loopback');
|
||||
expect(validateRestoreMarkerTarget('http://127.0.0.1:3210').hostname).toBe('127.0.0.1');
|
||||
expect(SYNTHETIC_CHARACTER_ID_MIN).toBeGreaterThan(2_000_000_000);
|
||||
});
|
||||
|
||||
test('restore marker requires explicit disposable confirmation for writes', () => {
|
||||
|
||||
Reference in New Issue
Block a user