Refuse a non-finite number where a text field coerces one #18
+1
-1
@@ -154,7 +154,7 @@ describe('parsing real PDUs', () => {
|
||||
assert.equal(smuggled.buffer, undefined);
|
||||
assert.ok(objToPdu({ cmdName: 'deliver_sm', params: { source_addr: '一' } }).err instanceof Error);
|
||||
|
||||
// String(NaN) is a sender the peer reads as the three letters, and the send reports success.
|
||||
// Coercing these spells the senders "NaN" and "Infinity", which a peer reads as those letters.
|
||||
assert.ok(objToPdu({ cmdName: 'deliver_sm', params: { source_addr: NaN } }).err instanceof Error);
|
||||
assert.ok(objToPdu({ cmdName: 'deliver_sm', params: { source_addr: Infinity } }).err instanceof Error);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user