╭ changed ──────────────╮ │src/ui/Repo/Patches.zig│ ╰───────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │294 const admin_repo = session.admin_repo orelse return error.NotFound; │ │295 const user_id = session.userId() orelse return error.NotFound; │ │296 const repo_id = data.repo_id orelse return error.NotFound; │ │297 - if (!try repo_source.hasBranch(io, allocator, target_branch)) return error.InvalidTargetBranch; │ │297 + if (!evt.Patch.branchValid(target_branch) or !try repo_source.hasBranch(io, allocator, target_branch)) return error.InvalidTargetBranch;│ │298 const fork_path = try fork.create(.{}, io, allocator, repos_dir, admin_repo, .{ │ │299 .id = id, │ │300 .user_id = user_id, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │373 const user_id = session.userId() orelse return error.NotFound; │ │374 const patch_id = evt.parseEventId(id) catch return error.NotFound; │ │375 const author = (try session.eventAuthor()) orelse return error.NotFound; │ │376 - if (!try repo_source.hasBranch(io, allocator, target_branch)) return error.InvalidTargetBranch; │ │376 + if (!evt.Patch.branchValid(target_branch) or !try repo_source.hasBranch(io, allocator, target_branch)) return error.InvalidTargetBranch;│ │377 │ │378 const id_hex = std.fmt.bytesToHex(patch_id, .lower); │ │379 const fork_path = try fork.forkPath(allocator, repos_dir, &id_hex); │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯