Compare commits
7
Commits
84f5500444
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
41428fbc65
|
||
|
|
9a12c5f3e2
|
||
|
|
5a1ba595f1
|
||
|
|
a142e0b596
|
||
|
|
ee3f064886
|
||
|
|
e39f938a39 | ||
|
|
408f16f798
|
No files matched your search
@@ -0,0 +1,137 @@
|
||||
name: security
|
||||
|
||||
# Shared security gate for FWS repositories: leaked credentials, known
|
||||
# vulnerabilities in the dependencies, shell injection patterns and, through
|
||||
# opengrep, the language level injection rules (SQL, command, template, XSS).
|
||||
# Every tool is a static binary downloaded at run time so the job does not
|
||||
# depend on what the runner image happens to ship.
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 4 * * 1'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
GITLEAKS_VERSION: '8.28.0'
|
||||
OSV_SCANNER_VERSION: '2.7.1'
|
||||
SHELLCHECK_VERSION: '0.10.0'
|
||||
OPENGREP_VERSION: '2.1.0'
|
||||
|
||||
jobs:
|
||||
secrets:
|
||||
name: secrets
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# `dir` scans the checkout rather than the history: a credential that was
|
||||
# removed from the tree must not keep the gate red forever, and the tree
|
||||
# is what a pull request introduces. A repository that needs to allowlist
|
||||
# fixtures ships a .gitleaks.toml next to this file.
|
||||
- name: Scan the tree for credentials
|
||||
run: |
|
||||
set -euo pipefail
|
||||
curl -fsSL -o "$RUNNER_TEMP/gitleaks.tgz" \
|
||||
"https://github.com/gitleaks/gitleaks/releases/download/v${GITLEAKS_VERSION}/gitleaks_${GITLEAKS_VERSION}_linux_x64.tar.gz"
|
||||
tar -xzf "$RUNNER_TEMP/gitleaks.tgz" -C "$RUNNER_TEMP" gitleaks
|
||||
config=()
|
||||
[ -f .gitleaks.toml ] && config=(--config .gitleaks.toml)
|
||||
"$RUNNER_TEMP/gitleaks" dir . --no-banner --redact --verbose --exit-code 1 "${config[@]}"
|
||||
|
||||
dependencies:
|
||||
name: dependencies
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# OSV reads the lockfiles it recognises (npm, pip, Go, Cargo, Composer…)
|
||||
# and answers from osv.dev. A repository without a lockfile passes instead
|
||||
# of failing, so the same workflow fits every stack in the organisation.
|
||||
- name: Scan dependencies for known vulnerabilities
|
||||
run: |
|
||||
set -euo pipefail
|
||||
curl -fsSL -o "$RUNNER_TEMP/osv-scanner" \
|
||||
"https://github.com/google/osv-scanner/releases/download/v${OSV_SCANNER_VERSION}/osv-scanner_linux_amd64"
|
||||
chmod +x "$RUNNER_TEMP/osv-scanner"
|
||||
"$RUNNER_TEMP/osv-scanner" scan source --recursive --allow-no-lockfiles --format table .
|
||||
|
||||
shell:
|
||||
name: shell
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install shellcheck
|
||||
run: |
|
||||
set -euo pipefail
|
||||
curl -fsSL -o "$RUNNER_TEMP/shellcheck.tar.xz" \
|
||||
"https://github.com/koalaman/shellcheck/releases/download/v${SHELLCHECK_VERSION}/shellcheck-v${SHELLCHECK_VERSION}.linux.x86_64.tar.xz"
|
||||
tar -xJf "$RUNNER_TEMP/shellcheck.tar.xz" -C "$RUNNER_TEMP"
|
||||
|
||||
- name: Collect the shell scripts
|
||||
run: |
|
||||
set -euo pipefail
|
||||
# PKGBUILD files are bash without a shebang, so shellcheck would report
|
||||
# SC2148 on every one of them: makepkg sources them, the gate does not.
|
||||
git ls-files -z '*.sh' '*.bash' > "$RUNNER_TEMP/scripts"
|
||||
printf '%s shell files to check\n' "$(tr -cd '\0' < "$RUNNER_TEMP/scripts" | wc -c)"
|
||||
|
||||
# SC2086/SC2046 and friends are the shapes an injection takes in shell.
|
||||
# They stay advisory for now: existing scripts would turn the gate red on
|
||||
# their first run, so warnings are reported and errors block. SC2148 (no
|
||||
# shebang) and SC2068 (array quoting, inherited from vendored shell
|
||||
# integrations) are not signals this gate can act on.
|
||||
- name: Shellcheck warnings (advisory)
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set -o pipefail
|
||||
[ -s "$RUNNER_TEMP/scripts" ] || { echo "No shell scripts in this repository."; exit 0; }
|
||||
xargs -0 -a "$RUNNER_TEMP/scripts" -r \
|
||||
"$RUNNER_TEMP/shellcheck-v${SHELLCHECK_VERSION}/shellcheck" -x --format=gcc --severity=warning \
|
||||
--exclude=SC2148,SC2068
|
||||
|
||||
- name: Shellcheck errors
|
||||
run: |
|
||||
set -euo pipefail
|
||||
[ -s "$RUNNER_TEMP/scripts" ] || { echo "No shell scripts in this repository."; exit 0; }
|
||||
xargs -0 -a "$RUNNER_TEMP/scripts" -r \
|
||||
"$RUNNER_TEMP/shellcheck-v${SHELLCHECK_VERSION}/shellcheck" -x --severity=error \
|
||||
--exclude=SC2148,SC2068
|
||||
|
||||
sast:
|
||||
name: sast
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install opengrep
|
||||
run: |
|
||||
set -euo pipefail
|
||||
curl -fsSL -o "$RUNNER_TEMP/opengrep" \
|
||||
"https://github.com/opengrep/opengrep/releases/download/v${OPENGREP_VERSION}/opengrep_linux_x86"
|
||||
chmod +x "$RUNNER_TEMP/opengrep"
|
||||
|
||||
# Advisory on purpose: the rules flag real injection shapes (SQL, command,
|
||||
# template, XSS) but also patterns that a codebase already reviewed. Run
|
||||
# it blocking once the reported findings have been triaged and the false
|
||||
# positives allowlisted in .semgrepignore.
|
||||
- name: Injection and unsafe-pattern scan (advisory)
|
||||
continue-on-error: true
|
||||
run: |
|
||||
set -uo pipefail
|
||||
args=()
|
||||
git ls-files '*.php' | grep -q . && args+=(--config p/php) || true
|
||||
git ls-files '*.js' '*.mjs' '*.cjs' '*.ts' | grep -q . && args+=(--config p/javascript) || true
|
||||
git ls-files '*.py' | grep -q . && args+=(--config p/python) || true
|
||||
git ls-files '*.go' | grep -q . && args+=(--config p/golang) || true
|
||||
if [ "${#args[@]}" -eq 0 ]; then
|
||||
echo "No supported source files in this repository."
|
||||
exit 0
|
||||
fi
|
||||
"$RUNNER_TEMP/opengrep" scan "${args[@]}" --severity ERROR \
|
||||
--exclude 3rdparty --exclude node_modules --exclude vendor --exclude external .
|
||||
@@ -302,7 +302,7 @@ _branch=feat/file-manager-panel
|
||||
### Publication automatique
|
||||
|
||||
`version`, à la racine, est la source de vérité des releases. Il suit la version
|
||||
du fork FWS (`0.1.16`), pas la version amont de kitty embarquée dans le paquet :
|
||||
du fork FWS (`0.1.17`), pas la version amont de kitty embarquée dans le paquet :
|
||||
c'est elle qui nomme le tag, la release et le paquet
|
||||
`fws-kitty-<version>-<rel>`. Il doit rester égal à `pkgver` dans
|
||||
`packaging/PKGBUILD` et à la version affichée par `fws-kitty`
|
||||
|
||||
@@ -219,6 +219,78 @@ you use a decent Wayland compositor.
|
||||
Detailed list of changes
|
||||
-------------------------------------
|
||||
|
||||
Fork FWS releases
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
The versions below are the releases of the FWS fork, which carries its own
|
||||
version so that a packaged build can be told apart from the upstream kitty it
|
||||
is based on. Each entry names the issue it closed.
|
||||
|
||||
0.1.17 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The changelog now names each fork release with the issue it closed, instead
|
||||
of leaving the fork changes in the accumulated upstream section. No
|
||||
functional change.
|
||||
|
||||
0.1.16 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The clipboard history picker now shows when each entry was copied and the
|
||||
title of the window the text will be pasted into, and :kbd:`↑`/:kbd:`↓` move
|
||||
the highlighted entry so that :kbd:`Enter` pastes it without typing the
|
||||
letters of a hint.
|
||||
|
||||
- The clicks of the docks are covered by tests: a left dock and a right dock
|
||||
must both receive the clicks in their own area, and the layout tests pin the
|
||||
position of a right dock instead of only its width.
|
||||
|
||||
0.1.15 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The :doc:`file manager <kittens/file-manager>` can be browsed with the mouse:
|
||||
the wheel scrolls the list, a double click opens the entry under the pointer
|
||||
like :kbd:`Enter`, and a right click opens the action palette on the clicked
|
||||
row.
|
||||
|
||||
0.1.14 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- :kbd:`Ctrl+Shift+H` browses the scrollback in a pager again with
|
||||
:ac:`show_scrollback`: the keyboard shortcuts panel, which silently took the
|
||||
key over while the documentation still promised the pager, moved to
|
||||
:kbd:`Ctrl+Shift+Alt+H`.
|
||||
|
||||
0.1.13 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The in-place scrollback search got a usable default shortcut,
|
||||
:kbd:`kitty_mod+alt+s`. It was bound to the same physical key as
|
||||
:ac:`move_window_forward`, which allows the shifted fallback, so the last
|
||||
definition won and the search never opened.
|
||||
|
||||
0.1.12 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The keyboard shortcuts panel keeps a long action name inside its own column,
|
||||
shrinks its key column on very narrow docks so that a row always fits, and
|
||||
shows the full name of the selected action on the help line, instead of
|
||||
letting the edge of the dock cut the text.
|
||||
|
||||
0.1.11 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- The current match of the in-place scrollback search is drawn with the second
|
||||
mark color, so the match reached with :kbd:`n` and :kbd:`N` stands out from
|
||||
the other ones without reading the window title.
|
||||
|
||||
0.1.10 [2026-12-03]
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
- A literal :code:`\c` or :code:`\r` can be searched for by writing a doubled
|
||||
backslash (:code:`\\c`, :code:`\\r`), instead of the query modifiers always
|
||||
taking the prefix.
|
||||
|
||||
0.50.1 [unreleased]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
@@ -376,8 +376,13 @@ func TestFilterEntriesLargeDirectory(t *testing.T) {
|
||||
if len(matches) == 0 {
|
||||
t.Fatal("expected matches in a large directory")
|
||||
}
|
||||
if elapsed > 100*time.Millisecond {
|
||||
t.Fatalf("filtering 10000 entries took %s, the limit is 100ms", elapsed)
|
||||
// The bound is deliberately loose: this guards against the filter becoming
|
||||
// superlinear (which turns 10000 entries into seconds), not against a few
|
||||
// extra milliseconds. A wall clock threshold tight enough to measure the
|
||||
// current implementation fails on a shared machine, where the same test
|
||||
// went from 15ms to 147ms while makepkg was building next to it.
|
||||
if elapsed > time.Second {
|
||||
t.Fatalf("filtering 10000 entries took %s, the limit is 1s", elapsed)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -424,10 +424,10 @@ handle_fast_commandline(CLISpec *cli_spec, const char *instance_group_prefix) {
|
||||
if (get_bool_cli_val(cli_spec, "version")) {
|
||||
if (isatty(STDOUT_FILENO)) {
|
||||
printf("\x1b[3mkitty\x1b[23m \x1b[32m%s\x1b[39m created by \x1b[1;34mKovid Goyal\x1b[22;39m\n", KITTY_VERSION);
|
||||
printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.16\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n");
|
||||
printf("\x1b[3mfws-kitty\x1b[23m \x1b[32m0.1.17\x1b[39m by \x1b[1;34mBlackAngelTV\x1b[22;39m\n");
|
||||
} else {
|
||||
printf("kitty %s created by Kovid Goyal\n", KITTY_VERSION);
|
||||
printf("fws-kitty 0.1.16 by BlackAngelTV\n");
|
||||
printf("fws-kitty 0.1.17 by BlackAngelTV\n");
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
@@ -2183,6 +2183,73 @@ update_mock_pointer(PyObject *self UNUSED, PyObject *args) {
|
||||
return Py_BuildValue("(iO)", result, updated ? Py_True : Py_False);
|
||||
}
|
||||
|
||||
/* Hit test a point against two windows placed side by side in a mock tab, and
|
||||
* return 1 or 2 for the window mouse_region() picks, or 0 when none is hit.
|
||||
* A docked window must receive the clicks in its own area, whatever the edge it
|
||||
* is docked at, so the edges are given here rather than assumed to be left. */
|
||||
static PyObject *
|
||||
mock_window_under_mouse(PyObject *self UNUSED, PyObject *args) {
|
||||
PyObject *capsule;
|
||||
int g[2][4];
|
||||
int mouse_x, mouse_y;
|
||||
if (!PyArg_ParseTuple(
|
||||
args,
|
||||
"O!iiiiiiiiii",
|
||||
&PyCapsule_Type,
|
||||
&capsule,
|
||||
&g[0][0],
|
||||
&g[0][1],
|
||||
&g[0][2],
|
||||
&g[0][3],
|
||||
&g[1][0],
|
||||
&g[1][1],
|
||||
&g[1][2],
|
||||
&g[1][3],
|
||||
&mouse_x,
|
||||
&mouse_y))
|
||||
return NULL;
|
||||
Window *w = PyCapsule_GetPointer(capsule, "Window");
|
||||
if (!w) return NULL;
|
||||
Screen *screen = w->render_data.screen;
|
||||
if (!screen) return NULL;
|
||||
OSWindow *saved_os_window = global_state.callback_os_window;
|
||||
const id_type saved_hover = global_state.mouse_hover_in_window;
|
||||
Window windows[2] = {*w, *w};
|
||||
for (unsigned int i = 0; i < 2; i++) {
|
||||
Window *win = windows + i;
|
||||
win->id = w->id + i;
|
||||
win->visible = true;
|
||||
win->render_data.screen = screen;
|
||||
win->render_data.geometry.left = (unsigned int)MAX(0, g[i][0]);
|
||||
win->render_data.geometry.top = (unsigned int)MAX(0, g[i][1]);
|
||||
win->render_data.geometry.right = (unsigned int)MAX(0, g[i][2]);
|
||||
win->render_data.geometry.bottom = (unsigned int)MAX(0, g[i][3]);
|
||||
zero_at_ptr(&win->padding);
|
||||
zero_at_ptr(&win->size_mismatch_padding);
|
||||
}
|
||||
Tab tab = {.windows = windows, .num_windows = 2};
|
||||
struct {
|
||||
FONTS_DATA_HEAD
|
||||
} fonts = {.logical_dpi_x = 72, .logical_dpi_y = 72, .fcm = {.cell_width = 10, .cell_height = 20}};
|
||||
OSWindow osw = {
|
||||
.tabs = &tab,
|
||||
.num_tabs = 1,
|
||||
.has_too_few_tabs = true,
|
||||
.fonts_data = (FONTS_DATA_HANDLE)&fonts,
|
||||
.viewport_width = 1400,
|
||||
.viewport_height = 600,
|
||||
.mouse_x = (double)mouse_x,
|
||||
.mouse_y = (double)mouse_y};
|
||||
global_state.callback_os_window = &osw;
|
||||
global_state.mouse_hover_in_window = 0;
|
||||
MouseRegion region = mouse_region(false, false);
|
||||
unsigned long ans = region.window == windows ? 1 : region.window == windows + 1 ? 2 : 0;
|
||||
global_state.callback_os_window = saved_os_window;
|
||||
global_state.mouse_hover_in_window = saved_hover;
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
return PyLong_FromUnsignedLong(ans);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
test_scale_scroll(PyObject *self UNUSED, PyObject *args) {
|
||||
PyObject *values;
|
||||
@@ -2258,6 +2325,7 @@ static PyMethodDef module_methods[] = {
|
||||
METHODB(test_mapped_scroll_steps, METH_VARARGS),
|
||||
METHODB(send_mock_mouse_event_to_window, METH_VARARGS),
|
||||
METHODB(update_mock_pointer, METH_VARARGS),
|
||||
METHODB(mock_window_under_mouse, METH_VARARGS),
|
||||
METHODB(send_mock_scroll_event_to_window, METH_VARARGS),
|
||||
METHODB(mock_mouse_selection, METH_VARARGS),
|
||||
{NULL, NULL, 0, NULL} /* Sentinel */
|
||||
|
||||
@@ -126,6 +126,16 @@ class TestDocks(BaseTest):
|
||||
content, placements = carve_docks(Region((0, 0, -1, -1, 0, 0)), groups, CELL_WIDTH, CELL_HEIGHT)
|
||||
self.ae([r.height for g, r in placements], [0, 0])
|
||||
|
||||
# A dock at the right is placed against the right edge of what remains,
|
||||
# the same way a dock at the left is placed against the left edge
|
||||
groups = []
|
||||
left, right = dock('left', '10%'), dock('right', '5%')
|
||||
content, placements = carve_docks(VIEWPORT, groups, CELL_WIDTH, CELL_HEIGHT)
|
||||
regions = {g.id: rect(r) for g, r in placements}
|
||||
self.ae(regions[left.id], (0, 0, 100, 600))
|
||||
self.ae(regions[right.id], (950, 0, 1000, 600))
|
||||
self.ae(rect(content), (100, 0, 950, 600))
|
||||
|
||||
def test_tab_docks(self):
|
||||
q = make_layout(Tall)
|
||||
windows = make_windows(q, 2)
|
||||
@@ -183,6 +193,9 @@ class TestDocks(BaseTest):
|
||||
self.assertTrue(rect(r)[0] >= allocated.left and rect(r)[2] <= allocated.left + allocated.width)
|
||||
self.ae(rect(dock_regions[0])[1], allocated.top + allocated.height - 2 * CELL_HEIGHT - 2 * DECORATION)
|
||||
self.ae(dock_regions[1].width, allocated.width // 4)
|
||||
# The dock at the right sits past the content, at the right of the area
|
||||
self.assertGreaterEqual(rect(dock_regions[1])[0], rect(content)[2])
|
||||
self.assertLessEqual(rect(dock_regions[1])[2], allocated.left + allocated.width)
|
||||
self.check_no_overlaps(windows)
|
||||
# The decorations chosen by the layout for the owner are preserved
|
||||
self.ae(main.geometry.spaces.left - main.geometry.compensatory.left, DECORATION)
|
||||
|
||||
@@ -834,3 +834,31 @@ class TestMouse(BaseTest):
|
||||
ac([], 4)
|
||||
self.assertTrue(s.callbacks.wtcbuf, 'the wheel event was not reported to the program')
|
||||
parse_bytes(s, b'\x1b[?1000l')
|
||||
|
||||
def test_docked_window_receives_clicks_at_any_edge(self):
|
||||
from kitty.fast_data_types import mock_window_under_mouse
|
||||
|
||||
s = self.create_screen(cols=140, lines=30)
|
||||
w = create_mock_window(s)
|
||||
terminal, right_dock = (0, 0, 1000, 600), (1000, 0, 1400, 600)
|
||||
left_dock, offset_terminal = (0, 0, 400, 600), (400, 0, 1400, 600)
|
||||
|
||||
def under(first, second, x, y):
|
||||
return mock_window_under_mouse(w, *first, *second, x, y)
|
||||
|
||||
# A dock at the right receives the clicks in its own area and the
|
||||
# terminal receives the clicks in the area left over
|
||||
self.ae(under(terminal, right_dock, 500, 300), 1)
|
||||
self.ae(under(terminal, right_dock, 999, 300), 1)
|
||||
self.ae(under(terminal, right_dock, 1000, 300), 2)
|
||||
self.ae(under(terminal, right_dock, 1200, 300), 2)
|
||||
# Swapping the two areas over must give the same answer for a dock at
|
||||
# the left, so the hit test does not depend on the edge
|
||||
self.ae(under(left_dock, offset_terminal, 500, 300), 2)
|
||||
self.ae(under(left_dock, offset_terminal, 100, 300), 1)
|
||||
self.ae(under(left_dock, offset_terminal, 399, 300), 1)
|
||||
# The first window wins when two areas overlap, as with an overlay
|
||||
self.ae(under(terminal, (500, 0, 1400, 600), 700, 300), 1)
|
||||
# A window with an empty area is never hit, even inside the other one
|
||||
self.ae(under(terminal, (0, 0, 0, 0), 1200, 300), 0)
|
||||
self.ae(under((0, 0, 0, 0), right_dock, 1200, 300), 2)
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
pkgname=fws-kitty
|
||||
# Fork version from the version file: it names the release and the package.
|
||||
# The upstream kitty release built inside is tracked by _kittyver below.
|
||||
pkgver=0.1.16
|
||||
pkgver=0.1.17
|
||||
pkgrel=1
|
||||
pkgdesc='Fast, feature-rich, GPU based terminal (FWS fork with the file-manager kitten)'
|
||||
arch=('x86_64' 'aarch64')
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ func ShowError(err error) {
|
||||
|
||||
func (self *Command) version_string(formatter *markup.Context) string {
|
||||
return fmt.Sprintln(formatter.Italic(self.CommandStringForUsage()), formatter.Opt(kitty.VersionString+kitty.VersionSuffix), "created by", formatter.Title("Kovid Goyal")) +
|
||||
fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.16"), "by", formatter.Title("BlackAngelTV"))
|
||||
fmt.Sprintln(formatter.Italic("fws-kitty"), formatter.Opt("0.1.17"), "by", formatter.Title("BlackAngelTV"))
|
||||
}
|
||||
|
||||
func (self *Command) ShowVersion() {
|
||||
|
||||
Reference in new issue
Block a user