╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │637 .local => return respondRemoveNotFound(request), │ │638 }; │ │639 const user_id = request_author.user_id orelse return respondLoginRequired(request); │ │640 - if (!try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │640 + if (!evt.Patch.branchValid(target_branch) or !try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │641 const form_location = try std.fmt.allocPrint(allocator, "{s}/patches/new", .{base}); │ │642 defer allocator.free(form_location); │ │643 return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, tags, description, target_branch, null));│ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1445 }; │ │1446 const request_repo = (try requestRepoSource(io, allocator, host, parts.repo_base)) orelse return respondRemoveNotFound(request); │ │1447 defer request_repo.deinit(allocator); │ │1448 - if (!try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │1448 + if (!evt.Patch.branchValid(target_branch) or !try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │1449 const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1450 defer allocator.free(form_location); │ │1451 return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, tags, description, target_branch, null));│ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯