Activity 01
Pair Programming: Validation Function Challenge
Pairs receive a basic user registration form code with no validation. They add checks for email format, password strength, and username length, then test with invalid inputs. Partners alternate coding and testing roles every 10 minutes.
How can input validation prevent common exploits like SQL injection and cross-site scripting?
Facilitation TipDuring Pair Programming: Validation Function Challenge, circulate and remind pairs to swap roles every 10 minutes so both students engage with the logic.
What to look forPresent students with a code snippet for a login form that lacks input validation. Ask them to identify at least two potential vulnerabilities and explain how an attacker might exploit them. For example: 'What happens if a user enters a very long username or special characters in the password field?'