Patching Insecure Direct Object Reference attack