mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-03-12 00:12:37 +01:00
When passed a socket name that starts with @, go will listen on an abstract unix domain socket. Forgejo breaks this by assuming the socket name is a file path and normalizing it to an absolute path. This small commit prevents treating the socket name as a filesystem path if it starts with @. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7020 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Mewp <codeberg.org@mewp.pl> Co-committed-by: Mewp <codeberg.org@mewp.pl>
15 lines
304 B
Go
15 lines
304 B
Go
// Copyright 2025 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
package graceful
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestAbstractUnixSocket(t *testing.T) {
|
|
_, err := DefaultGetListener("unix", "@abc")
|
|
require.NoError(t, err)
|
|
}
|