Skip to content

Conversation

zenyr
Copy link

@zenyr zenyr commented Oct 7, 2025

Issues

Session creation allowed nonexistent directories or paths outside the project scope, causing invalid sessions. Retrieval failed when accessing sessions created in different project contexts.

Fixes

  • Added async directory existence and project boundary checks in Session.create using Bun's native APIs to prevent invalid session creation.
  • Improved Session.get with loop-based fallback to global project, enabling cross-project session access.

Question

Is allowing arbitrary directory specification (e.g., /root/ for a project in /user/foo) intentional? This enables cross-project work but may confuse users. Should we restrict to project-related directories?

Fixes API inconsistency reported in bug analysis.

zenyr added 3 commits October 8, 2025 01:40
세션 가져오기 로직을 루프 기반 폴백으로 개선하고, 세션이 발견되지 않을 경우 명시적 오류를 발생시킵니다.
@zenyr
Copy link
Author

zenyr commented Oct 7, 2025

If allowing session creation in external folders (outside the project scope), it might be better to support full project CRUD operations instead, as the API currently lacks project deletion and management features.

@manno23
Copy link

manno23 commented Oct 10, 2025

I think that kind of secret contract just grew out of it being a single user, bundled application, I want to use this in cloudflare with client at home but this neede to get sorted out first for that. I dont know if you ever looked at the spec, but every operation endpoint has a single optional directory param that the client gives and yeah, its used to kind of push the server around when really the server should be locked down by configuration before it ever starts

@zenyr
Copy link
Author

zenyr commented Oct 11, 2025

I think that kind of secret contract just grew out of it being a single user, bundled application, I want to use this in cloudflare with client at home but this neede to get sorted out first for that. I dont know if you ever looked at the spec, but every operation endpoint has a single optional directory param that the client gives and yeah, its used to kind of push the server around when really the server should be locked down by configuration before it ever starts

Yes, I actually discovered this bug while trying to set up a headless home lab like Google Jules, and that aspect was concerning from both security and design standpoints. However, I worried that hastily fixing the bug might disrupt existing workflows. That's why I included the question in the PR description.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants