Skip to content

Commit aad5382

Browse files
author
Diego Nadares
committed
Merge branch 'refs/heads/white/staging' into white/master
2 parents aa643eb + 9175986 commit aad5382

8 files changed

Lines changed: 26 additions & 11 deletions

File tree

CHANGELOG/5.10.1/community.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* [FIX] Fix config endpoint authentication. #7889

CHANGELOG/5.10.1/date.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Jan 13th, 2025

RELEASE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
New features in the latest update
22
=====================================
33

4+
5.10.1 [Jan 13th, 2025]:
5+
---
6+
* [FIX] Fix config endpoint authentication. #7889
7+
48
5.10.0 [Jan 6th, 2025]:
59
---
610
* [ADD] CVSS4 data is now included in CSV exports. #7850

faraday/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
See the file 'doc/LICENSE' for the license information
55
"""
66

7-
__version__ = '5.10.0'
7+
__version__ = '5.10.1'

faraday/openapi/faraday_swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"info": {
33
"description": "The Faraday REST API enables you to interact with [our server](https://github.com/infobyte/faraday).\nUse this API to interact or integrate with Faraday server. This page documents the REST API, with HTTP response codes and example requests and responses.",
4-
"title": "Faraday 5.10.0 API",
4+
"title": "Faraday 5.10.1 API",
55
"version": "v3"
66
},
77
"security": [

faraday/server/api/modules/info.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Related third party imports
88
import flask
99
from flask import Blueprint
10+
from flask_login import current_user
1011
from marshmallow import Schema
1112

1213
# Local application imports
@@ -57,13 +58,17 @@ def get(self):
5758
200:
5859
description: Ok
5960
"""
60-
doc = {
61-
'ver': f_version,
62-
'show_vulns_by_price': DashboardSettings.settings.show_vulns_by_price,
63-
'smtp_enabled': False
64-
}
65-
66-
return flask.jsonify(doc)
61+
if current_user.is_authenticated:
62+
doc = {
63+
'ver': f_version,
64+
'show_vulns_by_price': DashboardSettings.settings.show_vulns_by_price,
65+
'smtp_enabled': False,
66+
'sso_enabled': False
67+
}
68+
return flask.jsonify(doc)
69+
return flask.jsonify({'sso_enabled': False})
70+
71+
get.is_public = True
6772

6873

6974
InfoView.register(info_api)

pynixify/packages/faradaysec/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
buildPythonPackage rec {
2020
pname = "faradaysec";
21-
version = "5.10.0";
21+
version = "5.10.1";
2222

2323
src = lib.cleanSource ../../..;
2424

tests/test_api_info.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ def test_api_info(self, test_client):
2222

2323
def test_api_config_no_login(self, test_client, session):
2424
response = test_client.get('config')
25-
assert response.status_code == 401
25+
keys = ['ver', 'show_vulns_by_price', 'smtp_enabled']
26+
assert response.status_code == 200
27+
assert response.json['sso_enabled'] is False
28+
for key in keys:
29+
assert key not in response.json.keys()
2630

2731
@pytest.mark.usefixtures('logged_user')
2832
def test_get_config(self, test_client):

0 commit comments

Comments
 (0)