-
Notifications
You must be signed in to change notification settings - Fork 114
Closed
Labels
bugSomething isn't workingSomething isn't workinggoPull requests that update go codePull requests that update go codegood first issueGood for newcomersGood for newcomers
Description
Bug description
Group names are designed to be case-insensitive, but they are case-sensitive on Linux.
Steps to reproduce
On any Linux distribution, make the following request:
curl 'http://localhost:46381/api/v1beta/groups' \
-H 'Accept: */*' \
-H 'Accept-Language: en-US' \
-H 'Connection: keep-alive' \
-H 'Referer: http://localhost:5173/' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-site' \
-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) ToolHive/0.0.0-dev Chrome/138.0.7204.185 Electron/37.2.6 Safari/537.36' \
-H 'content-type: application/json' \
-H 'sec-ch-ua: "Not)A;Brand";v="8", "Chromium";v="138"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Linux"' \
-H 'x-client-platform: linux' \
-H 'x-client-release-build: false' \
-H 'x-client-type: toolhive-studio' \
-H 'x-client-version: 0.0.0-dev' \
--data-raw '{"name":"defAult"}'
this should fail, because the default
group always exists. But on Linux, I am able to create a group called defAult
Expected behavior
Error:
"group_already_exists: group 'defAult' already exists"
Actual behavior
on Linux, I am able to create a group called defAult
Environment (if relevant)
ToolHive v0.2.15
Commit: d274a0a
Built: 2025-09-02 15:05:24 UTC
Go version: go1.24.1
Platform: linux/amd64
Additional context
Seems like the problem is this:
On Linux/amd64 (so, standard Linux on x86-64), the behavior of os.Stat(filePath) is case-sensitive almost all the time.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggoPull requests that update go codePull requests that update go codegood first issueGood for newcomersGood for newcomers