Fixed HUGE security hole where database can be written to in production