Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: validate nginx website name - #23

Merged
boGSer98 merged 1 commit into
fix/bound-certbot-executionfrom
fix/validate-website-name
Jun 4, 2026
Merged

boGSer98 merged 1 commit into
fix/bound-certbot-executionfrom
fix/validate-website-name

Conversation

@boGSer98

@boGSer98 boGSer98 commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Validate WEBSITE_NAME before Nginx/Certbot paths are used
  • Keep _ as the documented placeholder, otherwise allow DNS-style names with letters, numbers, dots, and dashes
  • Quote the generated Nginx site destination path and document the constraint

Dependency

Test Plan

  • python3 -m unittest tests.test_installer_features.InstallerFeatureTests.test_nginx_website_name_is_validated_before_file_paths_are_used -v -> passed
  • python3 -m unittest tests/test_installer_features.py -v -> passed
  • bash -n odoo_install.sh -> passed
  • scripts/validate.sh -> passed
  • git diff --check -> passed

@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: c5f793269a

โ„น๏ธ 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".

Comment thread odoo_install.sh

case "$value" in
"_") return 0 ;;
""|*[!a-zA-Z0-9.-]*|.*|*..*|*.)

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 labels that start or end with dashes

When WEBSITE_NAME contains a label like -odoo.example.com or odoo-.example.com, this pattern accepts it even though that is not a valid DNS hostname for the Certbot path below. In an Nginx + SSL install, the installer therefore proceeds through package installation and Nginx setup before failing at certificate issuance, which defeats the new early validation for mistyped DNS-style names.

Useful? React with ๐Ÿ‘ย / ๐Ÿ‘Ž.

@boGSer98
boGSer98 merged commit fbd33a1 into fix/bound-certbot-execution Jun 4, 2026
2 checks passed
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