Activity 01
Pair Programming: Login Validator
Pairs code a login function with validation for username length, password complexity, and sanitization against SQL injection. They exchange code with another pair to test malicious inputs like ' OR 1=1--. Pairs then patch vulnerabilities and report findings. End with whole-class share of toughest exploits.
How can we anticipate and neutralize malicious user input before it reaches the system core?
Facilitation TipDuring Pair Programming: Login Validator, circulate and ask each pair to explain why they chose a particular validation rule for one field, ensuring reasoning is explicit.
What to look forPresent students with a simple Python function that takes user input for a username. Ask them to write two lines of code: one to validate that the username is not empty, and another to sanitize it by removing any HTML tags.