An empirical analysis of input validation mechanisms in web applications and languages