Skip to content

fix(nginx): validate generated configuration values - #4781

Merged
nijel merged 1 commit into
mainfrom
validate
Sep 24, 2026
Merged

nijel merged 1 commit into
mainfrom
validate

Conversation

@nijel

@nijel nijel commented Sep 24, 2026

Copy link
Copy Markdown
Member

No description provided.

@nijel nijel self-assigned this Sep 24, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-24T07:27:53.411286Z d8a8c1c PR opened
🔒 Security Review ✅ Completed 2026-09-24T07:26:50.451076Z d8a8c1c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8a8c1ca4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

or not ANUBIS_PATH_PATTERN.fullmatch(parsed.path)
or parsed.query
or parsed.fragment
or (port is not None and not 1 <= port <= 65535)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject an empty explicit Anubis port

When WEBLATE_ANUBIS_URL is http://anubis: (or http://anubis:/path), urlsplit().port returns None, making this check indistinguishable from a URL with no port. The validator therefore succeeds and emits proxy_pass http://anubis:;, which nginx rejects because the colon introduces an empty port, causing container startup to fail instead of reporting the invalid environment value here.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it will be still clear where the error is. Let's rather keep the logic simple than cover all the corner cases.

@nijel
nijel merged commit 9f2bb4d into main Sep 24, 2026
93 of 95 checks passed
@nijel
nijel deleted the validate branch September 24, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant