diff --git a/CITATION.cff b/CITATION.cff index e9c11b6..bae5a4c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -24,5 +24,5 @@ keywords: - dxcluster - spiderweb license: GPL-3.0 -version: v2.5.7.3 -date-released: 2024-12-28 +version: v2.5.7.4 +date-released: 2024-12-29 diff --git a/README.md b/README.md index 6a6dca7..eddfaa5 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![CodeFactor](https://www.codefactor.io/repository/github/coulisse/spiderweb/badge/development)](https://www.codefactor.io/repository/github/coulisse/spiderweb/overview/development) -- **Release:** v2.5.7.3 +- **Release:** v2.5.7.4 - **Author:** Corrado Gerbaldo - [IU1BOW](https://www.qrz.com/db/IU1BOW) - **Mail:** - **Licensing:** Gpl V3.0 see [LICENSE](LICENSE) file. diff --git a/cfg/version.txt b/cfg/version.txt index 0816272..c45037c 100644 --- a/cfg/version.txt +++ b/cfg/version.txt @@ -1 +1 @@ -v2.5.7.3 \ No newline at end of file +v2.5.7.4 \ No newline at end of file diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index afc68eb..f2ef8d7 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,6 @@ ### Change log -Date: 28/12/2024 -Release: v2.5.7.3 +Date: 29/12/2024 +Release: v2.5.7.4 - Fixed Issue [#80](/~https://github.com/coulisse/spiderweb/issues/80) - Fixed Issue [#79](/~https://github.com/coulisse/spiderweb/issues/79) - Ficex Security issue [81](/~https://github.com/coulisse/spiderweb/pull/81) diff --git a/static/pwa/manifest.webmanifest b/static/pwa/manifest.webmanifest index 9c785bb..b33478d 100644 --- a/static/pwa/manifest.webmanifest +++ b/static/pwa/manifest.webmanifest @@ -1,5 +1,5 @@ { - "name": "IU1BOW Spiderweb v2.5.7.3", + "name": "IU1BOW Spiderweb v2.5.7.4", "description": "DXCluser for ham radio by IU1BOW", "short_name": "Spiderweb", "theme_color": "#f3b221", diff --git a/static/pwa/service-worker.js b/static/pwa/service-worker.js index 0a329aa..168bb1b 100644 --- a/static/pwa/service-worker.js +++ b/static/pwa/service-worker.js @@ -1,5 +1,5 @@ // Dichiarazione della costante per il nome della cache -const CACHE_NAME = 'pwa-spiderweb_v2.5.7.3' +const CACHE_NAME = 'pwa-spiderweb_v2.5.7.4' // Dichiarazione della costante per gli URL da mettere in cache const URLS_TO_CACHE = [ diff --git a/templates/_base.html b/templates/_base.html index 7caafa4..7603a3e 100644 --- a/templates/_base.html +++ b/templates/_base.html @@ -141,7 +141,7 @@   IU1BOW - Spiderweb   - v2.5.7.3 + v2.5.7.4 diff --git a/webapp.py b/webapp.py index 3345e61..29791e9 100644 --- a/webapp.py +++ b/webapp.py @@ -201,14 +201,24 @@ def get_nonce(): inline_script_nonce = secrets.token_hex() return inline_script_nonce -#check if it is a unique visitor +# Check if it is a unique visitor def visitor_count(): - user_ip = request.environ.get('HTTP_X_FORWARDED_FOR') or request.environ.get('HTTP_X_REAL_IP') or request.remote_addr + forwarded_for = request.environ.get('HTTP_X_FORWARDED_FOR') + if forwarded_for: + # Separa gli IP e prendi il primo IP dalla lista + user_ip = forwarded_for.split(',')[0].strip() + logger.debug("Proxy found") + logger.debug(f"List of IP returned from proxy: {forwarded_for} ") + else: + user_ip = request.environ.get('HTTP_X_REAL_IP') or request.remote_addr + logger.debug(f"user IP: {user_ip}") + if user_ip not in visits: visits[user_ip] = 1 else: - visits[user_ip] += 1 + visits[user_ip] += 1 + # ROUTINGS