fix: address bot review findings

- Add codeberg.org to deriveLinkedIssueProvider built-in Gitea check
- Fix Gitea PR review prompt: !N → #N (GitLab vs Gitea syntax)
- Update gitlab.mdx: remove 'read-only' claim (write support ships)
- Gate walkthrough Gitea PR source (server can't fulfill yet)
- Thread per-project API base URL override into walkthrough GitLab diff
- Stop following cross-origin redirects in GitLab/Gitea clients (auth leak prevention)
This commit is contained in:
2026-08-18 20:35:46 +00:00
parent 707991665a
commit 4ce02ee569
7 changed files with 27 additions and 9 deletions
+3
View File
@@ -227,7 +227,9 @@ export function createGiteaClient({ token, baseUrl }) {
// Follow redirects (301/302/308) exactly once. Gitea serves them for moved
// repos/users; a manual redirect keeps our Authorization header across the hop.
// Only follow same-origin redirects to avoid leaking the token to a different host.
let redirects = 0;
const baseHost = new URL(url).host;
while (
(response.status === 301 || response.status === 302 || response.status === 308)
&& headerValue(response.headers, 'location')
@@ -235,6 +237,7 @@ export function createGiteaClient({ token, baseUrl }) {
) {
const location = headerValue(response.headers, 'location');
const nextUrl = new URL(location, url).toString();
if (new URL(nextUrl).host !== baseHost) break;
response = await conditionalFetch(nextUrl, fetchOptions);
redirects += 1;
}