fix(artifacts): retain ASAR resources through cleanup failures
Give snapshot capture, header admission, packed members, and container streams one file-handle owner. Serialize adoption with reader shutdown, retain failed closes for retry, and remove snapshots only after descriptor cleanup succeeds. Cover unread members, pending opens, zero-byte members, and paired format/cleanup failures. Keep intentionally unrecoverable test fixtures hygienic and strengthen managed identity and process cleanup-authority expectations. Validation: full npm run check; 99 targeted tests and temporary-directory hygiene; exact discovery of 877 test files. No real vendor-provider verification was performed.
This commit is contained in:
+238
-110
@@ -1,10 +1,4 @@
|
||||
import {
|
||||
constants,
|
||||
createReadStream,
|
||||
createWriteStream,
|
||||
type ReadStream,
|
||||
type Stats,
|
||||
} from "node:fs";
|
||||
import { constants, createWriteStream, type Stats } from "node:fs";
|
||||
import {
|
||||
lstat,
|
||||
mkdtemp,
|
||||
@@ -46,51 +40,40 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
#archiveSize: number | undefined;
|
||||
#headerSize: number | undefined;
|
||||
readonly #entries = new Map<string, AsarEntryState>();
|
||||
readonly #unpackedHandles = new Map<
|
||||
UnpackedFileHandle,
|
||||
{
|
||||
readonly path: string;
|
||||
readonly owner: OwnedFileHandle<UnpackedFileHandle>;
|
||||
}
|
||||
>();
|
||||
readonly #ownedHandles = new Map<SharedAsarFileHandle, OwnedAsarHandle>();
|
||||
#snapshot: { readonly path: string; readonly sha256: string } | undefined;
|
||||
#snapshotRoot: string | undefined;
|
||||
#snapshotOperation: Promise<void> = Promise.resolve();
|
||||
|
||||
constructor(
|
||||
private readonly path: string,
|
||||
private readonly openUnpackedFile: OpenAsarUnpackedFile = open,
|
||||
private readonly removeSnapshot: (path: string) => Promise<void> = (path) =>
|
||||
rm(path, { recursive: true, force: true }),
|
||||
private readonly options: AsarArtifactReaderOptions = {},
|
||||
) {}
|
||||
|
||||
async *entries(signal?: AbortSignal): AsyncIterable<ArtifactEntry> {
|
||||
let paths: readonly AsarListedPath[];
|
||||
try {
|
||||
await this.prepareContainer(undefined, signal);
|
||||
const snapshotPath = this.#snapshotPath();
|
||||
this.#resetArchiveState();
|
||||
this.#entries.clear();
|
||||
const headerHandle = await open(
|
||||
snapshotPath,
|
||||
constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK,
|
||||
);
|
||||
try {
|
||||
const admitted = await admitAsarHeader(headerHandle);
|
||||
paths = await this.#withSnapshotOperation(async () => {
|
||||
const snapshotPath = this.#snapshotPath();
|
||||
this.#resetArchiveState();
|
||||
this.#entries.clear();
|
||||
const admitted = await this.#admitHeader(snapshotPath);
|
||||
this.#archiveSize = admitted.archiveBytes;
|
||||
this.#headerSize = admitted.headerBytes;
|
||||
} finally {
|
||||
await headerHandle.close();
|
||||
}
|
||||
abortIfNeeded(signal);
|
||||
paths = orderAsarListing(listPackage(snapshotPath, { isPack: false }));
|
||||
const archiveMetadata = await lstat(snapshotPath);
|
||||
if (!archiveMetadata.isFile() || archiveMetadata.isSymbolicLink())
|
||||
throw new ArtifactReaderFailure(
|
||||
"format",
|
||||
"ASAR container is not a regular file",
|
||||
abortIfNeeded(signal);
|
||||
const ordered = orderAsarListing(
|
||||
listPackage(snapshotPath, { isPack: false }),
|
||||
);
|
||||
this.#archiveSize = archiveMetadata.size;
|
||||
const archiveMetadata = await lstat(snapshotPath);
|
||||
if (!archiveMetadata.isFile() || archiveMetadata.isSymbolicLink())
|
||||
throw new ArtifactReaderFailure(
|
||||
"format",
|
||||
"ASAR container is not a regular file",
|
||||
);
|
||||
this.#archiveSize = archiveMetadata.size;
|
||||
return ordered;
|
||||
}, signal);
|
||||
} catch (cause: unknown) {
|
||||
throw asarFailure(this.path, "inventory", cause);
|
||||
}
|
||||
@@ -142,7 +125,47 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
}
|
||||
}
|
||||
|
||||
async #admitHeader(snapshotPath: string) {
|
||||
const headerHandle = await this.#openOwned(
|
||||
snapshotPath,
|
||||
constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK,
|
||||
);
|
||||
let admission:
|
||||
| {
|
||||
readonly ok: true;
|
||||
readonly value: Awaited<ReturnType<typeof admitAsarHeader>>;
|
||||
}
|
||||
| { readonly ok: false; readonly cause: unknown };
|
||||
try {
|
||||
admission = { ok: true, value: await admitAsarHeader(headerHandle) };
|
||||
} catch (cause: unknown) {
|
||||
admission = { ok: false, cause };
|
||||
}
|
||||
try {
|
||||
await this.#closeOwnedHandle(headerHandle);
|
||||
} catch (cleanupCause: unknown) {
|
||||
if (!admission.ok)
|
||||
throw ArtifactReaderFailure.withCleanup(
|
||||
admission.cause,
|
||||
ArtifactReaderFailure.cleanupObservation(cleanupCause, snapshotPath),
|
||||
);
|
||||
throw cleanupCause;
|
||||
}
|
||||
if (!admission.ok) throw admission.cause;
|
||||
return admission.value;
|
||||
}
|
||||
|
||||
async open(entry: ArtifactEntry, signal?: AbortSignal): Promise<Readable> {
|
||||
return this.#withSnapshotOperation(
|
||||
() => this.#openEntry(entry, signal),
|
||||
signal,
|
||||
);
|
||||
}
|
||||
|
||||
async #openEntry(
|
||||
entry: ArtifactEntry,
|
||||
signal?: AbortSignal,
|
||||
): Promise<Readable> {
|
||||
abortIfNeeded(signal);
|
||||
const state = this.#entries.get(entry.adapterKey);
|
||||
if (state === undefined && entry.kind !== "file")
|
||||
@@ -160,10 +183,16 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
"integrity",
|
||||
`ASAR entry metadata changed since inventory: ${state.entry.path}`,
|
||||
);
|
||||
const { metadata } = state;
|
||||
const producedEntry = state.entry;
|
||||
if (producedEntry.unpacked)
|
||||
return this.#openUnpackedStream(producedEntry, signal);
|
||||
if (state.entry.unpacked)
|
||||
return this.#openUnpackedStream(state.entry, signal);
|
||||
return this.#openPackedStream(state, signal);
|
||||
}
|
||||
|
||||
async #openPackedStream(
|
||||
state: AsarEntryState,
|
||||
signal?: AbortSignal,
|
||||
): Promise<Readable> {
|
||||
const { metadata, entry: producedEntry } = state;
|
||||
const archiveSize = this.#archiveSize;
|
||||
const headerSize = this.#headerSize;
|
||||
const offset =
|
||||
@@ -187,10 +216,11 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
"format",
|
||||
`ASAR entry range is outside its container: ${producedEntry.path}`,
|
||||
);
|
||||
let handle: FileHandle | undefined;
|
||||
const snapshotPath = this.#snapshotPath();
|
||||
let handle: SharedAsarFileHandle | undefined;
|
||||
try {
|
||||
const openedHandle = await open(
|
||||
this.#snapshotPath(),
|
||||
const openedHandle = await this.#openOwned(
|
||||
snapshotPath,
|
||||
constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK,
|
||||
);
|
||||
handle = openedHandle;
|
||||
@@ -202,25 +232,48 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
`ASAR container changed before read: ${producedEntry.path}`,
|
||||
);
|
||||
if (metadata.size === 0) {
|
||||
await closeAsarHandle(() => openedHandle.close(), signal);
|
||||
handle = undefined;
|
||||
await closeAsarHandle(
|
||||
() => this.#closeOwnedHandle(openedHandle),
|
||||
signal,
|
||||
);
|
||||
return Readable.from([]);
|
||||
}
|
||||
const source = openedHandle.createReadStream({
|
||||
const source = this.#ownedReadStream(openedHandle, {
|
||||
start,
|
||||
end: start + metadata.size - 1,
|
||||
autoClose: true,
|
||||
signal,
|
||||
});
|
||||
return readValidatedAsarEntry(
|
||||
handle = undefined;
|
||||
const output = readValidatedAsarEntry(
|
||||
source,
|
||||
metadata.size,
|
||||
producedEntry.path,
|
||||
this.path,
|
||||
signal,
|
||||
);
|
||||
this.#setOwnedOutput(openedHandle, output);
|
||||
return output;
|
||||
} catch (cause: unknown) {
|
||||
await handle?.close().catch(() => undefined);
|
||||
throw asarFailure(this.path, `read ${producedEntry.path}`, cause);
|
||||
const failure = asarFailure(
|
||||
this.path,
|
||||
`read ${producedEntry.path}`,
|
||||
cause,
|
||||
);
|
||||
if (handle !== undefined) {
|
||||
try {
|
||||
await this.#closeOwnedHandle(handle);
|
||||
} catch (cleanupCause: unknown) {
|
||||
throw ArtifactReaderFailure.withCleanup(
|
||||
failure,
|
||||
ArtifactReaderFailure.cleanupObservation(
|
||||
cleanupCause,
|
||||
snapshotPath,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
throw failure;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,49 +299,37 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
}
|
||||
|
||||
/** Read the same captured container that supplies headers and packed members. */
|
||||
async openContainer(signal?: AbortSignal): Promise<ReadStream> {
|
||||
async openContainer(signal?: AbortSignal): Promise<Readable> {
|
||||
await this.prepareContainer(undefined, signal);
|
||||
return createReadStream(
|
||||
this.#snapshotPath(),
|
||||
signal === undefined ? {} : { signal },
|
||||
);
|
||||
return this.#withSnapshotOperation(async () => {
|
||||
abortIfNeeded(signal);
|
||||
const snapshotPath = this.#snapshotPath();
|
||||
const handle = await this.#openOwned(
|
||||
snapshotPath,
|
||||
constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK,
|
||||
);
|
||||
return this.#ownedReadStream(handle, { signal });
|
||||
}, signal);
|
||||
}
|
||||
|
||||
async close(): Promise<void> {
|
||||
await this.#withSnapshotOperation(async () => {
|
||||
let cleanupFailure: ArtifactReaderFailure | undefined;
|
||||
for (const [handle, { path }] of this.#unpackedHandles) {
|
||||
try {
|
||||
await this.#closeUnpackedHandle(handle);
|
||||
} catch (cause: unknown) {
|
||||
cleanupFailure = ArtifactReaderFailure.withCleanup(
|
||||
cleanupFailure ?? cause,
|
||||
ArtifactReaderFailure.cleanupObservation(cause, path),
|
||||
);
|
||||
}
|
||||
}
|
||||
try {
|
||||
await this.#closeSnapshot();
|
||||
} catch (cause: unknown) {
|
||||
cleanupFailure = ArtifactReaderFailure.withCleanup(
|
||||
cleanupFailure ?? cause,
|
||||
ArtifactReaderFailure.cleanupObservation(cause, this.path),
|
||||
);
|
||||
}
|
||||
if (cleanupFailure !== undefined) throw cleanupFailure;
|
||||
});
|
||||
await this.#withSnapshotOperation(() => this.#closeSnapshot());
|
||||
}
|
||||
|
||||
async #captureSnapshot(signal?: AbortSignal): Promise<void> {
|
||||
let inputHandle: SharedAsarFileHandle | undefined;
|
||||
try {
|
||||
this.#snapshotRoot = await mkdtemp(join(tmpdir(), "rea-asar-snapshot-"));
|
||||
const snapshotPath = join(this.#snapshotRoot, "container.asar");
|
||||
const hash = createHash("sha256");
|
||||
const handle = await open(
|
||||
inputHandle = await this.#openOwned(
|
||||
this.path,
|
||||
constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK,
|
||||
);
|
||||
const source = handle.createReadStream();
|
||||
const source = this.#ownedReadStream(inputHandle, {
|
||||
signal,
|
||||
releaseOnClose: false,
|
||||
});
|
||||
const digesting = new Transform({
|
||||
transform(chunk: Buffer, _encoding, callback) {
|
||||
hash.update(chunk);
|
||||
@@ -301,34 +342,50 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
createWriteStream(snapshotPath, { flags: "wx", mode: 0o600 }),
|
||||
signal === undefined ? {} : { signal },
|
||||
);
|
||||
const completedInput = inputHandle;
|
||||
inputHandle = undefined;
|
||||
await this.#closeOwnedHandle(completedInput);
|
||||
this.#snapshot = { path: snapshotPath, sha256: hash.digest("hex") };
|
||||
} catch (cause: unknown) {
|
||||
const primary =
|
||||
let failure =
|
||||
signal?.aborted === true
|
||||
? new ArtifactReaderFailure("cancelled", "ASAR operation cancelled", {
|
||||
cause,
|
||||
})
|
||||
: asarFailure(this.path, "snapshot", cause);
|
||||
if (inputHandle !== undefined) {
|
||||
const failedInput = inputHandle;
|
||||
inputHandle = undefined;
|
||||
try {
|
||||
await this.#closeOwnedHandle(failedInput);
|
||||
} catch (cleanupCause: unknown) {
|
||||
failure = ArtifactReaderFailure.withCleanup(
|
||||
failure,
|
||||
ArtifactReaderFailure.cleanupObservation(cleanupCause, this.path),
|
||||
);
|
||||
}
|
||||
}
|
||||
try {
|
||||
await this.#closeSnapshot();
|
||||
if (this.#ownedHandles.size === 0) await this.#closeSnapshot();
|
||||
} catch (cleanupCause: unknown) {
|
||||
throw ArtifactReaderFailure.withCleanup(
|
||||
primary,
|
||||
failure,
|
||||
ArtifactReaderFailure.cleanupObservation(
|
||||
cleanupCause,
|
||||
this.#snapshotRoot ?? this.path,
|
||||
),
|
||||
);
|
||||
}
|
||||
throw primary;
|
||||
throw failure;
|
||||
}
|
||||
}
|
||||
|
||||
async #closeSnapshot(): Promise<void> {
|
||||
await this.#closeOwnedHandles();
|
||||
const root = this.#snapshotRoot;
|
||||
if (root !== undefined) {
|
||||
try {
|
||||
await this.removeSnapshot(root);
|
||||
await (this.options.removeSnapshot ?? defaultRemoveSnapshot)(root);
|
||||
if (this.#snapshotRoot === root) this.#snapshotRoot = undefined;
|
||||
} catch (cause: unknown) {
|
||||
throw ArtifactReaderFailure.withCleanup(cause, {
|
||||
@@ -386,7 +443,7 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
signal?: AbortSignal,
|
||||
): Promise<Readable> {
|
||||
const unpackedRoot = `${this.path}.unpacked`;
|
||||
let handle: UnpackedFileHandle | undefined;
|
||||
let handle: SharedAsarFileHandle | undefined;
|
||||
try {
|
||||
const rootMetadata = await lstat(unpackedRoot);
|
||||
if (!rootMetadata.isDirectory() || rootMetadata.isSymbolicLink())
|
||||
@@ -413,15 +470,12 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
"path",
|
||||
`ASAR unpacked entry is not a regular file: ${entry.path}`,
|
||||
);
|
||||
handle = await this.openUnpackedFile(
|
||||
handle = await (this.options.openUnpackedFile ?? open)(
|
||||
canonical,
|
||||
constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK,
|
||||
);
|
||||
const openedHandle = handle;
|
||||
this.#unpackedHandles.set(openedHandle, {
|
||||
path: canonical,
|
||||
owner: new OwnedFileHandle(openedHandle),
|
||||
});
|
||||
this.#adoptHandle(openedHandle, canonical);
|
||||
const openedMetadata = await openedHandle.stat();
|
||||
if (
|
||||
!openedMetadata.isFile() ||
|
||||
@@ -441,30 +495,28 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
);
|
||||
}
|
||||
abortIfNeeded(signal);
|
||||
const source = readFileHandleChunks(openedHandle, {
|
||||
start: 0,
|
||||
});
|
||||
source.once("close", () => {
|
||||
void this.#closeUnpackedHandle(openedHandle).catch(() => undefined);
|
||||
});
|
||||
return readValidatedAsarEntry(
|
||||
const source = this.#ownedReadStream(openedHandle, { start: 0 });
|
||||
handle = undefined;
|
||||
const output = readValidatedAsarEntry(
|
||||
source,
|
||||
undefined,
|
||||
entry.path,
|
||||
this.path,
|
||||
signal,
|
||||
);
|
||||
this.#setOwnedOutput(openedHandle, output);
|
||||
return output;
|
||||
} catch (cause: unknown) {
|
||||
let failure = asarUnpackedEntryFailure(this.path, entry, cause);
|
||||
if (handle !== undefined && this.#unpackedHandles.has(handle)) {
|
||||
if (handle !== undefined && this.#ownedHandles.has(handle)) {
|
||||
try {
|
||||
await this.#closeUnpackedHandle(handle);
|
||||
await this.#closeOwnedHandle(handle);
|
||||
} catch (cleanupCause: unknown) {
|
||||
failure = ArtifactReaderFailure.withCleanup(
|
||||
failure,
|
||||
ArtifactReaderFailure.cleanupObservation(
|
||||
cleanupCause,
|
||||
this.#unpackedHandles.get(handle)?.path ?? entry.path,
|
||||
this.#ownedHandles.get(handle)?.path ?? entry.path,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -473,11 +525,76 @@ export class AsarArtifactReader implements ArtifactReader {
|
||||
}
|
||||
}
|
||||
|
||||
async #closeUnpackedHandle(handle: UnpackedFileHandle): Promise<void> {
|
||||
const owned = this.#unpackedHandles.get(handle);
|
||||
async #closeOwnedHandle(handle: SharedAsarFileHandle): Promise<void> {
|
||||
const owned = this.#ownedHandles.get(handle);
|
||||
if (owned === undefined) return;
|
||||
await owned.owner.close();
|
||||
this.#unpackedHandles.delete(handle);
|
||||
owned.output?.destroy();
|
||||
owned.source?.destroy();
|
||||
try {
|
||||
await owned.owner.close();
|
||||
} catch (cause: unknown) {
|
||||
throw ArtifactReaderFailure.withCleanup(
|
||||
cause,
|
||||
ArtifactReaderFailure.cleanupObservation(cause, owned.path),
|
||||
);
|
||||
}
|
||||
this.#ownedHandles.delete(handle);
|
||||
}
|
||||
|
||||
async #closeOwnedHandles(): Promise<void> {
|
||||
let failure: ArtifactReaderFailure | undefined;
|
||||
for (const [handle, owned] of this.#ownedHandles) {
|
||||
try {
|
||||
await this.#closeOwnedHandle(handle);
|
||||
} catch (cause: unknown) {
|
||||
failure = ArtifactReaderFailure.withCleanup(
|
||||
failure ?? cause,
|
||||
ArtifactReaderFailure.cleanupObservation(cause, owned.path),
|
||||
);
|
||||
}
|
||||
}
|
||||
if (failure !== undefined) throw failure;
|
||||
}
|
||||
|
||||
async #openOwned(path: string, flags: number): Promise<SharedAsarFileHandle> {
|
||||
const handle = await (this.options.openFile ?? open)(path, flags);
|
||||
this.#adoptHandle(handle, path);
|
||||
return handle;
|
||||
}
|
||||
|
||||
#adoptHandle(handle: SharedAsarFileHandle, path: string): void {
|
||||
this.#ownedHandles.set(handle, {
|
||||
path,
|
||||
owner: new OwnedFileHandle(handle),
|
||||
});
|
||||
}
|
||||
|
||||
#ownedReadStream(
|
||||
handle: SharedAsarFileHandle,
|
||||
options: {
|
||||
readonly start?: number;
|
||||
readonly end?: number;
|
||||
readonly signal?: AbortSignal | undefined;
|
||||
readonly releaseOnClose?: boolean;
|
||||
},
|
||||
): Readable {
|
||||
const { releaseOnClose, ...readOptions } = options;
|
||||
const source = readFileHandleChunks(handle, readOptions);
|
||||
const owned = this.#ownedHandles.get(handle);
|
||||
if (owned === undefined)
|
||||
throw new ArtifactReaderFailure("integrity", "ASAR handle has no owner");
|
||||
owned.source = source;
|
||||
owned.output = source;
|
||||
if (releaseOnClose !== false)
|
||||
source.once("close", () => {
|
||||
void this.#closeOwnedHandle(handle).catch(() => undefined);
|
||||
});
|
||||
return source;
|
||||
}
|
||||
|
||||
#setOwnedOutput(handle: SharedAsarFileHandle, output: Readable): void {
|
||||
const owned = this.#ownedHandles.get(handle);
|
||||
if (owned !== undefined) owned.output = output;
|
||||
}
|
||||
|
||||
#resetArchiveState(): void {
|
||||
@@ -491,16 +608,27 @@ type AsarEntryState = {
|
||||
readonly metadata: AsarFileMetadata;
|
||||
readonly entry: ArtifactEntry;
|
||||
};
|
||||
type UnpackedFileHandle = {
|
||||
readonly fd: number;
|
||||
type SharedAsarFileHandle = Pick<FileHandle, "fd" | "read" | "close"> & {
|
||||
stat(): Promise<Stats>;
|
||||
close(): Promise<void>;
|
||||
read: FileHandle["read"];
|
||||
};
|
||||
type OpenAsarUnpackedFile = (
|
||||
type OpenAsarFile = (
|
||||
path: string,
|
||||
flags: number,
|
||||
) => Promise<UnpackedFileHandle>;
|
||||
) => Promise<SharedAsarFileHandle>;
|
||||
type OwnedAsarHandle = {
|
||||
readonly path: string;
|
||||
readonly owner: OwnedFileHandle<SharedAsarFileHandle>;
|
||||
source?: Readable;
|
||||
output?: Readable;
|
||||
};
|
||||
type AsarArtifactReaderOptions = {
|
||||
readonly openFile?: OpenAsarFile;
|
||||
readonly openUnpackedFile?: OpenAsarFile;
|
||||
readonly removeSnapshot?: (path: string) => Promise<void>;
|
||||
};
|
||||
|
||||
const defaultRemoveSnapshot = (path: string): Promise<void> =>
|
||||
rm(path, { recursive: true, force: true });
|
||||
|
||||
const asarUnpackedEntryFailure = (
|
||||
archivePath: string,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Stats } from "node:fs";
|
||||
import type { FileHandle } from "node:fs/promises";
|
||||
|
||||
import { ArtifactReaderFailure } from "./ArtifactReader.js";
|
||||
@@ -7,7 +8,7 @@ export const MAX_ASAR_HEADER_BYTES = 16 * 1024 * 1024;
|
||||
|
||||
/** Admit both Chromium pickle extents before an upstream decoder allocates them. */
|
||||
export const admitAsarHeader = async (
|
||||
handle: FileHandle,
|
||||
handle: Pick<FileHandle, "read"> & { stat(): Promise<Stats> },
|
||||
): Promise<{
|
||||
readonly archiveBytes: number;
|
||||
readonly headerBytes: number;
|
||||
|
||||
Reference in New Issue
Block a user