Documentation Index
Fetch the complete documentation index at: https://docs.esperr.com/llms.txt
Use this file to discover all available pages before exploring further.
What are Query Parameters?
Query parameters are key-value pairs that appear after the? in a URL. They send additional data to the server without being part of the main path.
MDN Web DocsRead more on URL query parameters.
Understanding Query Parameter Structure
category= shoessize= 10color= black
Common Query Parameter Uses
Search & Filtering
?q=search+term- Search queries?sort=price- Sorting options?filter=available- Filtering results?page=2- Pagination
Tracking & Analytics
?utm_source=email- Marketing attribution?ref=homepage- Referral tracking?session=abc123- Session tracking
API Parameters
?api_key=xxx- Authentication (not recommended!)?format=json- Response format?limit=100- Result limits?fields=id,name- Field selection
Application Control
?debug=true- Debug mode (dangerous in production!)?redirect=/dashboard- Post-login redirects?action=delete- Action specification
Using Query Parameters in Policies
Basic Examples
Block debug parameters in production:Advanced Patterns
Detect SQL injection attempts:Query Parameter Operators
| Operator | Use Case | Example |
|---|---|---|
| equals | Exact value match | action=delete |
| contains | Substring match | search contains “script” |
| starts with | Prefix match | ref starts with “partner_“ |
| is present | Parameter exists | debug is present |
| is not present | Parameter missing | api_key is not present |
| greater than | Numeric comparison | limit > 1000 |
| matches regex | Pattern matching | matches ^[0-9]+$ |
Security Considerations
Dangerous Query Parameters
| Parameter | Risk | What to Do |
|---|---|---|
debug=true | Exposes sensitive info | Block in production |
admin=1 | Privilege escalation | Block unless authorized |
redirect= | Open redirect attacks | Validate destinations |
file= | Path traversal | Sanitize file paths |
sql= | Direct SQL execution | Block immediately |
Common Attack Patterns
Open Redirect Detection:Best Practices
DO:
- Validate parameter values - Check for expected formats and ranges
- Monitor unusual parameters - Unknown parameters might indicate probing
- Limit parameter sizes - Extremely long values can cause issues
- Encode special characters - Prevent injection attacks
- Track parameter combinations - Certain combos might indicate attacks
DON’T:
- Trust user input - Always validate query parameters
- Expose internal parameters - Hide debug/admin params in production
- Use for sensitive data - Passwords, tokens shouldn’t be in URLs
- Ignore encoding - URL encoding can hide malicious content
- Allow unlimited values - Set reasonable limits
Working with Multiple Parameters
Often you need to check multiple parameters together:URL Encoding Gotchas
Encoding AwarenessQuery parameters are URL encoded:
- Space becomes
+or%20 &becomes%26=becomes%3D
Real-World Scenarios
E-commerce Protection
API Rate Limiting
Search Protection
Troubleshooting
“My query parameter policy isn’t matching”- Check URL encoding (spaces, special chars)
- Verify parameter name exactly
- Multiple values might use arrays (
tag[]=a&tag[]=b) - Some frameworks modify parameter names
- Your pattern might be too broad
- Consider parameter context (same param, different endpoints)
- URL encoding might cause unexpected matches
- Use monitoring before blocking
Integration Examples
With Other Fields
Related Fields
- Request Path - Parameters extend path functionality
- Headers - Some apps send params in headers too
- Body Data - POST requests might use body instead
- Cookies - Session data alternative to URL params