HERMES-GIELIE/api
nesquena-hermes cbb4ba3f28
fix(profiles): profile isolation — new_session uses per-request profile, not process global (#800)
Fixes the multi-client profile isolation bug (#798).

- get_hermes_home_for_profile(): pure path resolver, validates name against
  _PROFILE_ID_RE (rejects path traversal), never mutates os.environ or globals
- new_session() accepts explicit profile= param from POST body (S.activeProfile),
  short-circuits the process-level _active_profile global
- streaming handler resolves HERMES_HOME from s.profile instead of the global
- sessions.js sends profile: S.activeProfile in every new-session POST

10 tests in tests/test_issue798.py including concurrency and traversal coverage.

Co-authored-by: nesquena <nesquena@users.noreply.github.com>
2026-04-21 16:16:51 +00:00
..
__init__.py
auth.py release: v0.50.102–v0.50.108 batch (code blocks, utf-8, image URLs, deletion warning, PermissionError, Docker docs, kimi-k2.5) (#755) 2026-04-20 00:26:55 -07:00
clarify.py feat: harden clarify dialog flow and refresh recovery 2026-04-15 13:10:50 +08:00
commands.py feat: slash command parity + skill autocomplete — v0.50.91 (PR #711) 2026-04-19 05:37:44 +00:00
config.py fix(config): invalidate model-list TTL cache on default-model change 2026-04-20 19:32:33 -07:00
gateway_watcher.py fix(sessions): return None instead of 'unknown' for missing gateway session model (fixes #443) 2026-04-14 19:06:22 +00:00
helpers.py fix(csp): allow external https images in img-src — closes #608 2026-04-16 23:34:21 -07:00
models.py fix(profiles): profile isolation — new_session uses per-request profile, not process global (#800) 2026-04-21 16:16:51 +00:00
onboarding.py fix(onboarding): recognize credential_pool OAuth auth for openai-codex (#797) 2026-04-21 15:41:34 +00:00
profiles.py fix(profiles): profile isolation — new_session uses per-request profile, not process global (#800) 2026-04-21 16:16:51 +00:00
routes.py fix(profiles): profile isolation — new_session uses per-request profile, not process global (#800) 2026-04-21 16:16:51 +00:00
session_ops.py feat: slash command parity + skill autocomplete — v0.50.91 (PR #711) 2026-04-19 05:37:44 +00:00
startup.py v0.46.0: security, Docker UID/GID, model discovery, i18n, cancel fix 2026-04-11 10:17:52 -07:00
state_sync.py security: bandit fixes B310/B324/B110 + QuietHTTPServer (#354) 2026-04-13 11:11:56 -07:00
streaming.py fix(profiles): profile isolation — new_session uses per-request profile, not process global (#800) 2026-04-21 16:16:51 +00:00
updates.py fix: dynamic version badge — read from git tag, never hardcoded (#790) 2026-04-20 20:36:53 -07:00
upload.py v0.50.25: mobile scroll, import timestamps, profile security, mic fallback (#404) 2026-04-13 22:11:45 -07:00
workspace.py fix: HERMES_WEBUI_DEFAULT_WORKSPACE wins over settings.json; trust DEFAULT_WORKSPACE subtree (#610) 2026-04-16 18:09:16 -07:00