Preventing input validation vulnerabilities in web applications through automated type analysis