-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
priority/highHigh priority - Should be addressed soonHigh priority - Should be addressed soontype/securitySecurity-related changesSecurity-related changes
Description
Security Issue
No rate limiting on HTTP requests to target wikis - can overwhelm servers or trigger IP bans.
Current Code
scraper.py:94 - No rate limiting on get_page_raw()
Risk Level
Medium - Can cause:
- IP bans from target wikis
- Denial of service (unintentional)
- Poor netizen behavior
Solution
from ratelimit import limits, sleep_and_retry
class DokuWikiHTTPClient:
def __init__(self, rate_limit='10/minute'):
self.rate_limiter = RateLimiter(rate_limit)
@sleep_and_retry
@limits(calls=10, period=60)
def get_page_raw(self, page_id: str):
# existing codeTasks
- Add rate limiting to HTTP client
- Make rate limit configurable
- Add per-domain rate limiting
- Add request timeout configuration
- Log rate limit events
Metadata
Metadata
Assignees
Labels
priority/highHigh priority - Should be addressed soonHigh priority - Should be addressed soontype/securitySecurity-related changesSecurity-related changes