You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 30, 2018. It is now read-only.
try(PreparedStatementst = connection.prepareStatement("SELECT ... ? ... ?"));
st.setInt(1, anho);
st.setString(2, nombre);
ResultSetrs = st.executeQuery();
//WARNING: nothing as param to executeQuery or we vulnerable af
Los interrogantes del prepared statement van sin entrecomillar, lo metemos directamente en la cadena, sin concatenar nada. Java ya interpreta directamente cómo tiene que gestionar eso.
Si metiésemos parámetro executeQuery() estaríamos llamando al método de la superclase Statement y seríamos igualmente vulnerables que si no usásemos prepared