Commit graph

9 commits

Author SHA1 Message Date
Copilot
750f043872
Fix critical security vulnerability: Move SQLite database outside webroot (#738)
* Initial plan

* Fix critical security vulnerability: Move SQLite database outside webroot

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

* Update documentation to explain secure SQLite database path

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

* Clarify SQLite database security requirements for different installation scenarios

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

* Improve security documentation with web server configuration guidance

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

* Fix incomplete file path in documentation example

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

* Clarify that database file is created after first test in verification step

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
2025-12-17 21:45:13 +01:00
Copilot
1360664796
Fix SQLite database path to resolve "unable to open database file" error (#736)
* Initial plan

* Fix SQLite database path and add write permission checks

- Changed default SQLite database path from '../../speedtest_telemetry.sql' to '__DIR__/speedtest_telemetry.db' to keep it within the results directory
- Added directory existence and writability checks with helpful error messages
- Added SQLite database files to .gitignore to prevent committing user data

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

* Fix indentation to use tabs consistently in telemetry_db.php

Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>

* Remove temporary backup file

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: sstidl <12804296+sstidl@users.noreply.github.com>
2025-12-17 21:00:20 +01:00
sstidl
420be5e72f
Release 5.4 (#645)
* Initial implementation of ipinfo.io offline database

* Removed unnecessary code

* add: download ipinfo db during docker build

* fixed workflow

* rename warning in workflow

* commit to trigger workflow

* Refactor getIP

* Improved UI

* Updated docker version with 5.4 changes

* Updated README.md

* Added fallback in getIP in case the offline db is missing

* Fixed typos

* just md linting

* Removed vscode stuff

* Implemented fallback in getIP for PHP<8 (returns only the IP)

* Updated doc.md

* Fixed comments in telemetry_settings.php

* New quick start video

* Corrected image name in doc_docker.md

* Replaced speedtest with just test in stats.php

* docker documentation update

* typo

---------

Co-authored-by: Federico Dossena <info@fdossena.com>
Co-authored-by: Stefan Stidl <stefan.stidl@ffg.at>
2024-08-04 07:06:27 +00:00
Tracy-B
5956e07a7a
Microsoft SQL Server support and Sanity Check page (#569)
* Create telemetry_mssql.sql

SQL to create the speedtest_users table on Microsoft SQL server.

This SQL is based on the original templates, and continues to uses nvarchar for all fields as the templates do – even though some of the fields should be int.

* Added support for Microsoft SQL Server

* New sanitycheck.php page plus required updates to telemetry_db.php

Created a sanity check page to verify that the required PHP extensions are installed, and that it is possible to connect to the database.

* Update README.md - MS SQL support

Added mention of Microsoft SQL Server as a supported DB engine.

* Added missing <tr> to sanitycheck.php
2023-07-31 08:10:56 +02:00
dosse91
8be8aba5ed Fixed typo in results/index.php 2021-04-13 10:27:36 +02:00
Bernd Stellwag
fb7575b67b
Refactor results/ PHP code (#369)
* put code to insert and query data from database into separate file

* simplify obfuscation salt file handling

* use new DB interaction functions in telemetry.php

* use new DB interaction functions in stats.php

and fix indentation levels

* format telemetry settings file

* use new function for interacting with DB in index.php

* move drawing of the image into function and try to comment each section with what it does

* reorder lines for parts of the image to align with the order they appear on the image

* bugfix: display obfuscated and deobfuscated id in stats if id obfuscation is enabled

* improve error handling

* add missing PHPDocs to functions

* imageftbbox returns an array on success and false on failure so to check if the font is usable, check if we got an array

* fix dsn for postgres

* fix limit sql statement for postgresql

* remove obsolete require statement

* use require instead of require_once since the settings file might need to be loaded multiple times

because it just contains plain variables which will just get loaded into the current scope

* move require statements to the top of the file

* make sure files are readable before requiring them

* add constant to refer to the telemetry settings file and check if it is readable before loading it

* return null if no speedtest result was found for the given id and show according message to the user instead of just exiting

* use existing constant instead of string for telemetry settings file name

* uniformly use single quotes instead of double quotes as most code places already used single quotes

* somehow some tabs sneaked in, replace them to uniformly use spaces

* mysql now uses pdo, too, reflect that in the requirements documentation

* pass username and password as constructor parameters instead of via DSN
2020-10-20 07:43:48 +02:00
Kristan Webb
9efae7c27c
Add Port option for MySql (#330) 2020-06-11 15:34:29 +02:00
dosse91
a50fcfe566 IP addresses can now be redacted automatically from telemetry 2019-09-28 08:22:14 +02:00
dosse91
c3e576ddba Major project restructuring and unification with mpot branch 2019-06-30 07:03:06 +02:00
Renamed from telemetry/telemetry_settings.php (Browse further)