Harden security controls from REPORT findings
This commit is contained in:
@@ -3,16 +3,17 @@
|
||||
from redis import Redis
|
||||
from rq import Queue
|
||||
|
||||
from app.core.config import get_settings
|
||||
from app.core.config import get_settings, validate_redis_url_security
|
||||
|
||||
|
||||
settings = get_settings()
|
||||
|
||||
|
||||
def get_redis() -> Redis:
|
||||
"""Creates a Redis connection from configured URL."""
|
||||
"""Creates a Redis connection after enforcing URL security policy checks."""
|
||||
|
||||
return Redis.from_url(settings.redis_url)
|
||||
secure_redis_url = validate_redis_url_security(settings.redis_url)
|
||||
return Redis.from_url(secure_redis_url)
|
||||
|
||||
|
||||
def get_processing_queue() -> Queue:
|
||||
|
||||
Reference in New Issue
Block a user