mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-29 12:09:37 +00:00
fix(security): unauthenticated api endpoint exposes domain inform
The access_info API view in plinth/modules/api/views.py returns a list of all registered domains and their types without requiring authentication. This exposes sensitive network configuration information to unauthenticated users. Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
This commit is contained in:
parent
bacaa59725
commit
49ab335e1b
@ -16,6 +16,8 @@ from plinth.modules import names
|
||||
|
||||
def access_info(request: HttpRequest, **kwargs) -> HttpResponse:
|
||||
"""API view to return a list of domains and types."""
|
||||
if not request.user.is_authenticated:
|
||||
return HttpResponse(status=401)
|
||||
domains = [{
|
||||
'domain': domain.name,
|
||||
'type': domain.domain_type.component_id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user