v5.0.8 — Correctifs

This commit is contained in:
Quentin Rouiller
2026-04-21 12:53:22 +02:00
parent 77c68dbe83
commit 9d701701e6
2 changed files with 12 additions and 5 deletions
+11 -4
View File
@@ -131,7 +131,17 @@ async function fetchXhr2(origin, phpsessid, actionId) {
async function fetchFicheHtml(origin, phpsessid, formLink) {
const url = `${origin}/index.php?${formLink}&PHPSESSID=${encodeURIComponent(phpsessid)}`;
console.log("[bg] fetchFicheHtml →", url.substring(0, 120));
const r = await fetch(url, { credentials: "include" });
// v5.0.8 : EasyVista retourne maintenant un <script> de redirection si on
// fait la requête sans Referer. Probablement une protection CSRF ajoutée
// récemment. On ajoute un Referer qui simule une navigation depuis la
// page principale du planning.
const r = await fetch(url, {
credentials: "include",
headers: {
"Referer": `${origin}/index.php?eventName=HelpDesk_PlanningItem`,
"X-Requested-With": "XMLHttpRequest"
}
});
if (!r.ok) {
const err = new Error("HTTP " + r.status);
err.kind = classifyHttpStatus(r.status);
@@ -140,9 +150,6 @@ async function fetchFicheHtml(origin, phpsessid, formLink) {
}
const html = await r.text();
console.log("[bg] fiche status =", r.status, "| taille =", html.length);
// v5.0.7 : si la réponse est anormalement petite (< 500 octets), c'est
// probablement une redirection ou une réponse d'erreur courte — on logge
// le contenu pour diagnostiquer.
if (html.length < 500) {
console.warn("[bg] ⚠ fiche très courte, contenu =", JSON.stringify(html));
}
+1 -1
View File
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "Planification",
"version": "5.0.7",
"version": "5.0.8",
"description": "Vue claire et rapide du planning des techniciens EasyVista. Regroupe interventions et réservations par tech, affiche horaires, contact, lieu, catégorie et statut en un coup d'œil.",
"permissions": ["activeTab", "scripting", "storage", "tabs", "alarms"],
"host_permissions": [