Skip to content

Install review accepts the home folder itself as a placed folder; the server rejects it and the review is lost #237

Closed

Description

@nixfred

What happens

In the install review (web/src/screens/Store.tsx), choosing "A folder in your home" pre-fills the field with f.suggest ?? ${home}/``. When the listing gives no suggested name, that is /home/<user>/. The client check (line 449):

const folderOk = (p) => p == null || (p.startsWith(`${home}/`) && !p.slice(home.length).split('/').some((x) => x.startsWith('.')) && !p.includes('..'))

accepts it, so no warning is shown and Install is enabled. The server (folderAllowed in omarchyd/apps.mjs, line 304) requires the path to be strictly inside home, so apps.install fails with " can't use /home/: pick a folder inside your home folder".

Because install() calls setReviewing(false) right after mutate, and the effect on line 446 resets placed whenever reviewing changes, the failure also returns the user to the app page and discards the folder choices and the "allow" tick; they have to start the review again.

The check also disagrees in the other direction: p.includes('..') rejects a folder name such as Backup..old that the server allows, and /home/u//media passes the client but fails on the server.

How to reproduce

I ran both checks in Node (folderAllowed imported from omarchyd/apps.mjs, home /home/me):

"/home/me/"          client: true   server: false
"/home/me//media"    client: true   server: false
"/home/me/Media/"    client: true   server: true
"/home/me/my..folder" client: false server: true

In the app: install an app whose listing has a folders: entry without suggest, pick "A folder in your home", leave the field as it is and press Install. Expected: the field is flagged as invalid and Install is disabled, or the review stays open with the error.

Suggested fix

Make folderOk match folderAllowed (strictly longer than home/ after removing trailing slashes, no //, no hidden or .. path segments), and only close the review after the install call succeeds.

Environment

Omarchy Server main (0786ba9, 0.9.50), Node 26.

Activity

  1. added a commit that references this issue on Nov 21, 2026
    f146afd
  2. calledtoconstruct commented on Nov 21, 2026

    @calledtoconstruct
    Collaborator

    Thank you @nixfred. A folder set to home itself, a double slash, or a dot segment is refused, and the install review stays open until the install succeeds. This is on main in #858.

    🤖 Generated with Grok 4.7

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions