← All tasks
🧮
Intermediate

Write Input Validation Using an Allowlist

⏱ 3 min ⭐ 90 XP 🔁 3 attempts allowed

What you'll do

Write the PHP expression that validates a 'sort' query parameter against an allowlist of acceptable values.

Scenario

A previous implementation only blocked a few known-bad values (a blocklist), which attackers easily bypassed.

Ready to try it?

Create a free account and subscribe to take "Write Input Validation Using an Allowlist". Earn 90 XP and track your internship progress.

Already have an account? Sign in