oh-my-adhd 0.2.3 → 0.2.4
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/dist/mcp/lib/brain.js +2 -2
- package/package.json +1 -1
package/dist/mcp/lib/brain.js
CHANGED
|
@@ -275,7 +275,7 @@ export async function getThreads() {
|
|
|
275
275
|
return sorted;
|
|
276
276
|
}
|
|
277
277
|
export async function getThread(threadId) {
|
|
278
|
-
if (!threadId || !/^[
|
|
278
|
+
if (!threadId || !/^[a-zA-Z0-9_-]+$/.test(threadId))
|
|
279
279
|
return null;
|
|
280
280
|
try {
|
|
281
281
|
return await fs.readFile(path.join(THREADS_DIR, `${threadId}.md`), "utf-8");
|
|
@@ -339,7 +339,7 @@ export async function savePage(slug, content) {
|
|
|
339
339
|
await fs.writeFile(tmpPage, content, "utf-8");
|
|
340
340
|
await fs.rename(tmpPage, pageFile);
|
|
341
341
|
}
|
|
342
|
-
const UUID_RE = /^[
|
|
342
|
+
const UUID_RE = /^[a-zA-Z0-9_-]+$/;
|
|
343
343
|
const TRASH_DIR = path.join(BRAIN_DIR, ".trash");
|
|
344
344
|
export async function deleteThread(threadId) {
|
|
345
345
|
if (!UUID_RE.test(threadId)) {
|
package/package.json
CHANGED