Fix leak in toilet drain pipe
An epoxy patch is going to be a temporary fix and considering the amount of work you're going to have to go through to repair the ceiling, why not do it right?

Remove as much of the existing plumbing as you need to in order to get at "clean" ends, and then replace with new plumbing.