block / block/berd

Dot-relative chat file links resolve from filesystem root

Open
#169 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
909
Forks
116
Avg merge
1d 1h
Merged PRs (30d)
156

Description

## Symptom

In Berd 0.6.2, inside the main window with a valid attached session folder, a Markdown link such as `[Open](./report.html)` fails with:

```text
File not found: /report.html (session cwd: /Users/.../project)
```

The same existing file opens when the link destination is written as `report.html`. External HTTPS links also open normally.

## Cause

The Markdown hardening pipeline rewrites `./report.html` and `../report.html` to `/report.html` before the artifact click handler resolves the destination against the session working directory.

This is separate from #166, which covers opener permissions outside `$HOME`.

## Acceptance

- Preserve safe `./` and `../` Markdown destinations exactly through rendering.
- Continue blocking unsafe schemes and forged internal sentinels.
- Cover both dot-relative forms with renderer-level regression tests.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Markdown hardening pipeline and the artifact click handler in the renderer, then inspect the existing renderer-level tests. Reproduce the handling of ./report.html and ../report.html with an attached session folder. Done means both dot-relative destinations remain usable while unsafe schemes and forged internal sentinels remain blocked.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.