Refractoring Stage 5 DAV functions EDIT/DEL tied to creators account
This commit is contained in:
@@ -32,3 +32,9 @@ test('serializes contacts with escaped fields and an injected identifier', () =>
|
||||
'N:Example Lovelace;Ada;;;\r\nEMAIL:ada@example.com\r\n' +
|
||||
'NOTE:Research\\, analysis\\; mathematics\r\nEND:VCARD\r\n');
|
||||
});
|
||||
|
||||
test('rejects DAV identifiers that can inject fields or escape resource paths', () => {
|
||||
assert.throws(() => makeCalendarData({ date: '2026-10-16', title: 'Bad', _dav: { uid: 'good\r\nX-Evil: yes' } }), /identifier is invalid/);
|
||||
assert.throws(() => makeCalendarData({ date: '2026-10-16', title: 'Bad', _dav: { uid: '../other' } }), /identifier is invalid/);
|
||||
assert.throws(() => makeVcard({ name: 'Bad', email: 'x@example.test', _dav: { uid: 'x'.repeat(256) } }), /identifier is invalid/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user