Unfortunately i don't think there is a way out without following the corridor back the way you came, I'm still trying to figure this one out.
If you're really desperate though you could try opening the game to LAN with cheats enabled, typing
/gamerule keepInventory true followed by
/kill to try respawning at the spawn point along with all your items (the gamerule command stops you losing your items on death).
Unfortunately these worlds have a habit of changing your spawn point when you're inside the other dimension so you might be a touch screwed. I seem to remember spawning in some obsidian and building a portal to the nether though, Once i was inside i was able to build another portal and go through which generated an exit on the overworld (regular world) and i was able to escape. Only catch was i had to spawn in the actual Portal item that makes up the purple stuff on the inside
/give playername 90
Give those a shot see how you get on :)
I had the same problem, best plan of action to anyone out there stuck in another dimention is to die. This will make you spawn in limbo, there is some pretty scary stuff in there, but don't worry! Then, make your way to these dark red blocks, they will be hard to see but you will find them eventually! Hop onto set block and bob's your uncle, you are back in the overworld! A minor issue you will be Very far away from where you entered, so make sure you have a marker! I hope this helps, Rift Jumpers!