Apparently everything you typed was executed in a terminal, so if you typed "reboot" anywhere, including in a chat window, it would reboot your device.
So open up a chat app, type return, reboot, return. Tada.
I can't find some original sources, but there is a summary I found on Slashdot. https://mobile.slashdot.org/story/08/11/08/1720246/bug-in-an...
Apparently everything you typed was executed in a terminal, so if you typed "reboot" anywhere, including in a chat window, it would reboot your device.