Compare commits

...
5 Commits
Author SHA1 Message Date
Zaid Humaimidi 38e9dfd0e6 1.2.16 2026-03-29 13:59:06 -07:00
Zaid Humaimidi b6102bddbc Changelog for v1.2.16 2026-03-29 13:58:40 -07:00
Zaid Humaimidi e22b0c499e Update npm-shrinkwrap.json 2026-03-29 13:35:03 -07:00
Zaid Humaimidi 969dfaf943 Revert "Fix device ID parsing regression in Mithril 2.3.8"
This reverts commit f9ee39dfd0.
2026-03-29 12:58:36 -07:00
Zaid Humaimidi fb7e973d8b Revert Mithril to v2.2.2
Revert Mithril from v2.3.8 back to v2.2.2 (used in v1.2.13) to fix
regression bugs in the latest version that have not been resolved.
2026-03-29 12:57:58 -07:00
4 changed files with 752 additions and 744 deletions

No files matched your search

+6
View File
@@ -1,5 +1,11 @@
# Change Log # Change Log
## 1.2.16 (2026-03-29)
- Fix regression in v1.2.15 that broke the device search component in the UI by
pinning Mithril dependency to v2.2.2 due to multiple unresolved regressions in
later versions.
## 1.2.15 (2026-03-26) ## 1.2.15 (2026-03-26)
- Fix critical RCE vulnerability in /api/ping endpoint (follow-up to - Fix critical RCE vulnerability in /api/ping endpoint (follow-up to
+741 -712
View File
File diff suppressed because it is too large. Load diff
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "genieacs", "name": "genieacs",
"version": "1.2.15", "version": "1.2.16",
"description": "A TR-069 Auto Configuration Server (ACS)", "description": "A TR-069 Auto Configuration Server (ACS)",
"repository": { "repository": {
"type": "git", "type": "git",
@@ -46,7 +46,7 @@
"@types/jsonwebtoken": "^9.0.10", "@types/jsonwebtoken": "^9.0.10",
"@types/koa": "^2.15.0", "@types/koa": "^2.15.0",
"@types/koa-compress": "^4.0.7", "@types/koa-compress": "^4.0.7",
"@types/mithril": "^2.2.8", "@types/mithril": "^2.2.6",
"@types/node": "^20.19.37", "@types/node": "^20.19.37",
"@types/parsimmon": "^1.10.9", "@types/parsimmon": "^1.10.9",
"@types/seedrandom": "^3.0.8", "@types/seedrandom": "^3.0.8",
@@ -56,7 +56,7 @@
"esbuild": "^0.27.4", "esbuild": "^0.27.4",
"eslint": "^8.57.1", "eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.2", "eslint-config-prettier": "^9.1.2",
"mithril": "^2.3.8", "mithril": "2.2.2",
"prettier": "^3.8.1", "prettier": "^3.8.1",
"sql.js": "^1.14.1", "sql.js": "^1.14.1",
"svgo": "^3.3.3", "svgo": "^3.3.3",
+2 -29
View File
@@ -3,29 +3,6 @@ import { m } from "./components.ts";
import config from "./config.ts"; import config from "./config.ts";
import * as store from "./store.ts"; import * as store from "./store.ts";
// Workaround for Mithril 2.3.8 regression
// https://github.com/MithrilJS/mithril.js/issues/3064
function getPathParamFromHash(hash: string, prefix: string): string | null {
if (!hash.startsWith(prefix)) return null;
const pathWithQuery = hash.slice(prefix.length);
// Stop at query string or hash fragment (mirrors Mithril's parsePathname)
const queryIdx = pathWithQuery.indexOf("?");
const hashIdx = pathWithQuery.indexOf("#");
let pathEnd = pathWithQuery.length;
if (queryIdx >= 0) pathEnd = Math.min(pathEnd, queryIdx);
if (hashIdx >= 0) pathEnd = Math.min(pathEnd, hashIdx);
const rawPath = pathWithQuery.slice(0, pathEnd);
// Normalize: collapse slashes, remove trailing slash (matches Mithril)
const normalizedPath = rawPath.replace(/\/{2,}/g, "/").replace(/\/$/, "");
// Decode once (Mithril already decoded with decodeURIComponentSafe)
return decodeURIComponent(normalizedPath);
}
export function init( export function init(
args: Record<string, unknown>, args: Record<string, unknown>,
): Promise<Record<string, unknown>> { ): Promise<Record<string, unknown>> {
@@ -35,13 +12,9 @@ export function init(
); );
} }
const deviceId =
getPathParamFromHash(window.location.hash, "#!/devices/") ??
(args.id as string);
return Promise.resolve({ return Promise.resolve({
deviceId: deviceId, deviceId: args.id,
deviceFilter: ["=", ["PARAM", "DeviceID.ID"], deviceId], deviceFilter: ["=", ["PARAM", "DeviceID.ID"], args.id],
}); });
} }