Compare commits

...

4 commits
dev ... master

Author SHA1 Message Date
Federico Dossena dd1ce2cb88 Fixed vulnerability in json.php caused my missing Content-Type header 2024-04-27 15:12:32 +02:00
sstidl 748f49c3b6
build docker images on schedule
to ensure docker image updates, we build the image once a week
2024-04-15 11:49:40 +02:00
sstidl 4640c64412
revert .github/workflows/snyk-security.yml
was an accident. sorry. but we got a freshdocker image without php8 bugs this way ;-)
2024-04-15 11:29:24 +02:00
sstidl 5b17b397c5
Create snyk-security.yml 2024-04-15 08:06:48 +02:00
3 changed files with 9 additions and 6 deletions

View file

@ -6,8 +6,8 @@ name: Docker
# documentation.
on:
# schedule:
# - cron: '30 20 * * *'
schedule:
- cron: '30 20 * * Sun'
push:
branches: ["*"]
# Publish semver tags as releases.

View file

@ -1,5 +1,8 @@
<?php
error_reporting(0);
header('Content-Type: application/json; charset=utf-8');
require_once 'telemetry_db.php';
/**
@ -53,7 +56,7 @@ function formatSpeedtestData($speedtest)
$speedtest = getSpeedtestUserById($_GET['id']);
if (!is_array($speedtest)) {
echo '{}';
} else {
$speedtest = formatSpeedtestData($speedtest);
echo json_encode(array('timestamp'=>$speedtest['timestamp'],'download'=>$speedtest['dl'],'upload'=>$speedtest['ul'],'ping'=>$speedtest['ping'],'jitter'=>$speedtest['jitter'],'ispinfo'=>$speedtest['ispinfo']));
}
$speedtest = formatSpeedtestData($speedtest);
echo json_encode(array('timestamp'=>$speedtest['timestamp'],'download'=>$speedtest['dl'],'upload'=>$speedtest['ul'],'ping'=>$speedtest['ping'],'jitter'=>$speedtest['jitter'],'ispinfo'=>$speedtest['ispinfo']));

View file

@ -49,7 +49,7 @@ function Speedtest() {
this._settings = {}; //settings for the speed test worker
this._state = 0; //0=adding settings, 1=adding servers, 2=server selection done, 3=test running, 4=done
console.log(
"LibreSpeed by Federico Dossena v5.3.0 - https://github.com/librespeed/speedtest"
"LibreSpeed by Federico Dossena v5.3.1 - https://github.com/librespeed/speedtest"
);
}