Finding and fixing insecure direct object references in Python