@inetafrica/open-claudia 1.19.3 → 1.19.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/bot-agent.js +3 -1
- package/bot.js +3 -1
- package/package.json +1 -1
- package/web.js +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.19.5
|
|
4
|
+
- Stop printing the Web UI admin password in startup logs.
|
|
5
|
+
|
|
6
|
+
## v1.19.4
|
|
7
|
+
- Legacy/static env-only deployments with no persisted `auth.json` owner now treat configured `TELEGRAM_CHAT_ID` chats as owners for shared auth commands. This fixes authorized test chats being blocked from `/codex_login` when no `isOwner` metadata exists yet.
|
|
8
|
+
|
|
3
9
|
## v1.19.3
|
|
4
10
|
- Owner-only auth commands now recognize chats marked as `isOwner: true` in `auth.json`, not only the first `TELEGRAM_CHAT_ID`. This fixes owner-authenticated Telegram chats being blocked from `/codex_login` and `/codex_setup_token`.
|
|
5
11
|
|
package/bot-agent.js
CHANGED
|
@@ -332,7 +332,9 @@ function isOwner(msg) {
|
|
|
332
332
|
if (chatId === CHAT_ID) return true;
|
|
333
333
|
try {
|
|
334
334
|
const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
|
|
335
|
-
|
|
335
|
+
const authorized = Array.isArray(auth.authorized) ? auth.authorized : [];
|
|
336
|
+
if (authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true)) return true;
|
|
337
|
+
if (!authorized.some((a) => a.isOwner === true) && CHAT_IDS.includes(chatId)) return true;
|
|
336
338
|
} catch (e) {}
|
|
337
339
|
return false;
|
|
338
340
|
}
|
package/bot.js
CHANGED
|
@@ -663,7 +663,9 @@ function isOwner(msg) {
|
|
|
663
663
|
if (chatId === CHAT_ID) return true;
|
|
664
664
|
try {
|
|
665
665
|
const auth = JSON.parse(fs.readFileSync(AUTH_FILE, "utf-8"));
|
|
666
|
-
|
|
666
|
+
const authorized = Array.isArray(auth.authorized) ? auth.authorized : [];
|
|
667
|
+
if (authorized.some((a) => String(a.chatId) === chatId && a.isOwner === true)) return true;
|
|
668
|
+
if (!authorized.some((a) => a.isOwner === true) && CHAT_IDS.includes(chatId)) return true;
|
|
667
669
|
} catch (e) {}
|
|
668
670
|
return false;
|
|
669
671
|
}
|
package/package.json
CHANGED
package/web.js
CHANGED
|
@@ -700,9 +700,8 @@ function startWebServer() {
|
|
|
700
700
|
});
|
|
701
701
|
|
|
702
702
|
server.listen(PORT, () => {
|
|
703
|
-
const pw = getPassword();
|
|
704
703
|
console.log(`Web UI running on http://localhost:${PORT}`);
|
|
705
|
-
console.log(
|
|
704
|
+
console.log("Admin password configured.");
|
|
706
705
|
});
|
|
707
706
|
|
|
708
707
|
return server;
|