Длинный каталог данных блокирует запуск BYDLO на Linux и macOS

Open
#341 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
53/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp

Research direction

Read PlatformServices.cs:15–32, UnixActivationBroker.cs:28–29 and :58, and Program.cs:45–60 to trace how the data directory becomes a Unix socket path and how startup handles failures. Start by reproducing with a path over 120 UTF-8 bytes on Linux or macOS using --mock; done means first and later instances start and activation reaches the primary instance while retaining the lock and permissions.

Written by the indexing model from the issue text.

Description

bug

Приоритет P1 · milestone 0.4.1

Допустимый путь BYDLO_DATA_DIR может превышать предел адреса Unix-сокета. Приложение открывает окно ошибки вместо основного интерфейса даже в первом экземпляре.

Воспроизведение

  1. На Linux/macOS задать приватный каталог данных с полным путём более 120 байт UTF-8.
  2. Запустить приложение с безопасным окружением и --mock.
  3. Конструирование адреса desktop.sock отклонит путь. Изолированная проверка адреса длиной 128 байт воспроизвела ArgumentException до открытия сокета.

Причина: PlatformServices.cs:15–32 принимает каталог данных. UnixActivationBroker.cs:28–29 и :58 добавляет ipc/desktop.sock и передаёт полный путь в UnixDomainSocketEndPoint. Program.cs:45–60 обрабатывает исключение переходом в интерфейс ошибки. Путь файла может быть валиден для ФС и слишком длинным для сокета.

Ожидаемо: первый и последующие экземпляры запускаются с данным каталогом и передают активацию основному экземпляру.

Направление исправления: использовать короткий защищённый runtime-каталог текущего пользователя и детерминированное имя по хешу каталога данных. Сохранить блокировку и ограничение прав.

Аудит ffa65648867139f9e45c15f4b635a83c1ff52c1b.

Dominant language
C#
Stars
5
Forks
1
Avg merge
23m
Merged PRs (30d)
144

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from endercodezz/BYDLO

All issues in endercodezz/BYDLO

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.