benetherington / node-TOM-discord-bot

MIT License
2 stars 0 forks source link

A JS runtime error is thrown when processing some emails #66

Closed benetherington closed 2 years ago

benetherington commented 2 years ago

This crashed the server:

textLines = [
    '-Ben E. (he/they)',
    '\n',
    '\n',
    '\n',
    '---------- Forwarded message ---------',
    '\n',
    'From: Damonjalis <censored@censored.com>',
    '\n',
    'Date: Sun, 4 Sept 2022 at 09:47',
    '\n',
    'Subject: Thisweeksf',
    '\n',
    'To: Orbital Mechanics OM Quiz Answers <info@theorbitalmechanics.com>',
    '\n',
    '\n',
    '\n',
    'September 9th, 1982. Successful launch of first commercially funded rocket,',
    '\n',
    'Conestoga 1.',
    '\n',
    '\n',
    '1st attempt: Rocket Percheron. Breed of horse. Rocket exploded on pad.',
    '\n',
    'Horse shot before being set free.',
    '\n',
    '\n',
    '2nd attempt: Conestoga 1. Type of covered wagon. Famous in Oregon Trail.',
    '\n',
    'This wagon successfully forded the river(which never seemed to happen',
    '\n',
    'successfully in the game)',
    '\n',
    '\n',
    '3rd and last attempt: Conestoga 1620. This rocket, much like everytime you',
    '\n',
    'played Oregon Trail, died of dysentery 46 seconds into flight. Radio noise',
    '\n',
    'confused the computer to make unneeded course corrections causing it to run',
    '\n',
    'out of hydraulic fluid.',
    '\n',
    '\n',
    'Love this clue',
    '\n',
    'The Greek',
    '\n',
];