Fix exploit involving session IDs and some other mumbo jumbo