Skip to content

[fix] Validated extra file paths #400#401

Merged
nemesifier merged 3 commits into
masterfrom
issues/400-reject-invalid-file-paths
Jul 21, 2026
Merged

[fix] Validated extra file paths #400#401
nemesifier merged 3 commits into
masterfrom
issues/400-reject-invalid-file-paths

Conversation

@nemesifier

Copy link
Copy Markdown
Member

Checklist

  • I have read the OpenWISP Contributing Guidelines.
  • I have manually tested the changes proposed in this pull request.
  • I have written new test cases for new code and/or updated existing tests for changes to existing code.
  • I have updated the documentation.

Reference to Existing Issue

Closes #400.

Description of Changes

This change validates extra file paths during backend validation.

Malformed paths are rejected before they can be written into generated
configuration archives. Normal absolute and relative paths remain valid,
while whitespace, shell characters, empty path parts, and . or ..
components are rejected.

Internal template placeholders are still accepted when they are properly
wrapped in {{ and }}, because some validation flows run before the
full runtime context is available.

Screenshot

Not applicable.

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 37497d6d-74f1-4910-bf3c-fc10685e2ce9

📥 Commits

Reviewing files that changed from the base of the PR and between 7bbb28d and 0503795.

📒 Files selected for processing (3)
  • docs/source/backends/openwrt.rst
  • netjsonconfig/backends/base/backend.py
  • tests/test_base.py
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{py,html}

📄 CodeRabbit inference engine (Custom checks)

Mark all user-facing strings as translatable using the Django i18n framework in Django pull requests

Files:

  • tests/test_base.py
  • netjsonconfig/backends/base/backend.py
🧠 Learnings (1)
📚 Learning: 2026-03-13T05:53:38.499Z
Learnt from: stktyagi
Repo: openwisp/netjsonconfig PR: 355
File: tests/openwrt/test_default.py:0-0
Timestamp: 2026-03-13T05:53:38.499Z
Learning: Enforce importing ValidationError from netjsonconfig.exceptions instead of jsonschema.exceptions across the codebase. This aligns with project conventions (including tests like tests/openwrt/test_default.py) and should be validated by CI. When reviewing Python files, flag any imports like from jsonschema.exceptions import ValidationError and suggest from netjsonconfig.exceptions import ValidationError (or equivalent relative import) to maintain consistency.

Applied to files:

  • tests/test_base.py
  • netjsonconfig/backends/base/backend.py
🔇 Additional comments (3)
netjsonconfig/backends/base/backend.py (1)

178-182: LGTM!

Also applies to: 200-209, 278-280

docs/source/backends/openwrt.rst (1)

2849-2851: LGTM!

tests/test_base.py (1)

66-67: 📐 Maintainability & Code Quality

ValidationError import is already correct. It comes from netjsonconfig.exceptions, so no change needed.

			> Likely an incorrect or invalid review comment.

📝 Walkthrough

Walkthrough

BaseBackend now validates extra configuration file paths during validate(). Paths are checked against an allowed character set, template placeholders must be properly wrapped, and path components cannot be empty or equal to . or ... Invalid paths raise ValidationError. Tests and OpenWrt documentation cover the new rules.

Estimated code review effort: 3 (Moderate) | ~20 minutes


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error)

Check name Status Explanation Resolution
General Rules ❌ Error OpenWrt docs say only letters/numbers/._-/ are allowed, but the validator also accepts wrapped {{...}} placeholders, so the rule is documented inaccurately. Update the files-path docs/error text to mention supported {{...}} placeholders, or remove that support if it isn’t intended.
✅ Passed checks (7 passed)
Check name Status Explanation
Title check ✅ Passed The title is descriptive and matches the main change: validating extra file paths for issue #400.
Description check ✅ Passed The description includes the checklist, issue reference, change summary, and screenshot note, matching the required template mostly well.
Linked Issues check ✅ Passed The PR implements the requested safe path validation rules, including path components, allowed characters, and template placeholders.
Out of Scope Changes check ✅ Passed The changes stay focused on file-path validation, related tests, and documentation updates without clear unrelated additions.
Bug Fixes ✅ Passed Root-cause validation is added in BaseBackend.validate(); tests cover the issue examples and would fail without the new file-path checks. No UI or flaky behavior involved.
Features ✅ Passed Issue #400 exists and is labeled/assigned to a maintainer; docs mention the feature; tests were added; coverage in the PR summary increased slightly; no UI changes.
Changes ✅ Passed Docs were updated, tests cover the new path validation, there are no UI changes, and generate() keeps old archives downloadable despite stricter validation.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issues/400-reject-invalid-file-paths

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Extra file paths were written into generated archives and later
applied by device agents. The backend now rejects malformed paths
during validation so bogus archive entries do not reach downstream
tools.

Closes #400
@nemesifier
nemesifier force-pushed the issues/400-reject-invalid-file-paths branch from ea67865 to a70204a Compare July 20, 2026 16:36
@openwisp-companion

Copy link
Copy Markdown

Flake8 E203 Error in netjsonconfig/backends/base/backend.py

Hello @nemesifier,
(Analysis for commit a70204a)

The CI failed due to a flake8 error (E203: whitespace before ':') on line 203 of netjsonconfig/backends/base/backend.py.

Fix:
Remove the whitespace before the colon in the _validate_file_path_chars method. The line should be changed from:
if path[index] in "{}":
to:
if path[index] in "{}":

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@netjsonconfig/backends/base/backend.py`:
- Around line 186-190: Update the JsonSchemaError message in the path validation
logic to state that paths may also be rejected for invalid components, including
empty, "." or ".." components, while retaining the existing allowed-character
guidance. Keep the validation behavior and error path unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a34681c3-ed02-4eba-884e-db59c07793c8

📥 Commits

Reviewing files that changed from the base of the PR and between 0ecb9cd and ea67865.

📒 Files selected for processing (2)
  • netjsonconfig/backends/base/backend.py
  • tests/test_base.py
📜 Review details
⏰ Context from checks skipped due to timeout. (1)
  • GitHub Check: Kilo Code Review
⚠️ CI failures not shown inline (4)

GitHub Actions: Netjsonconfig CI Build / Python==3.10: [fix] Validated extra file paths #400

Conclusion: failure

View job details

##[group]Run ./run-qa-checks
 �[36;1m./run-qa-checks�[0m
 shell: /usr/bin/bash -e {0}
 env:
   pythonLocation: /opt/hostedtoolcache/Python/3.10.20/x64
   PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.10.20/x64/lib/pkgconfig
   Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.20/x64
   Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.20/x64
   Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.10.20/x64
   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.10.20/x64/lib
 ##[endgroup]
 SUCCESS: Blank endline check successful!
 SUCCESS: Isort check successful!
 --- /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.731206+00:00
 +++ /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.552740+00:00
 @@ -44,11 +44,15 @@
              {
                  "files": [
                      {"path": "/etc/config/network", "mode": "0644", "contents": ""},
                      {"path": "etc/openvpn/client.conf", "mode": "0644", "contents": ""},
                      {"path": "{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 -                    {"path": "/etc/{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 +                    {
 +                        "path": "/etc/{{cert_path_abc123}}",
 +                        "mode": "0644",
 +                        "contents": "",
 +                    },
                  ]
              }
          )
          b.validate()
 ERROR: Black check failed! Hint: did you forget to run openwisp-qa-format?
 ./netjsonconfig/backends/base/backend.py:203:26: E203 whitespace before ':'
 ERROR: Flake8 check failed!
 SUCCESS: ReStructuredText check successful!
 Commit validation: successful!
 File manage.py not found, skipping Make Migration Check.
 ##[error]Process completed with exit code 1.

GitHub Actions: Netjsonconfig CI Build / 3_Python==3.11.txt: [fix] Validated extra file paths #400

Conclusion: failure

View job details

##[group]Run ./run-qa-checks
 �[36;1m./run-qa-checks�[0m
 shell: /usr/bin/bash -e {0}
 env:
   pythonLocation: /opt/hostedtoolcache/Python/3.11.15/x64
   PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.15/x64/lib/pkgconfig
   Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.15/x64
   Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.15/x64
   Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.15/x64
   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.15/x64/lib
 ##[endgroup]
 SUCCESS: Blank endline check successful!
 SUCCESS: Isort check successful!
 --- /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.253388+00:00
 +++ /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.926620+00:00
 @@ -44,11 +44,15 @@
              {
                  "files": [
                      {"path": "/etc/config/network", "mode": "0644", "contents": ""},
                      {"path": "etc/openvpn/client.conf", "mode": "0644", "contents": ""},
                      {"path": "{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 -                    {"path": "/etc/{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 +                    {
 +                        "path": "/etc/{{cert_path_abc123}}",
 +                        "mode": "0644",
 +                        "contents": "",
 +                    },
                  ]
              }
          )
          b.validate()
 ERROR: Black check failed! Hint: did you forget to run openwisp-qa-format?
 ./netjsonconfig/backends/base/backend.py:203:26: E203 whitespace before ':'
 ERROR: Flake8 check failed!
 SUCCESS: ReStructuredText check successful!
 Commit validation: successful!
 File manage.py not found, skipping Make Migration Check.
 ##[error]Process completed with exit code 1.

GitHub Actions: Netjsonconfig CI Build / 4_Python==3.12.txt: [fix] Validated extra file paths #400

Conclusion: failure

View job details

##[group]Run ./run-qa-checks
 �[36;1m./run-qa-checks�[0m
 shell: /usr/bin/bash -e {0}
 env:
   pythonLocation: /opt/hostedtoolcache/Python/3.12.13/x64
   PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.13/x64/lib/pkgconfig
   Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
   Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
   Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.13/x64/lib
 ##[endgroup]
 SUCCESS: Blank endline check successful!
 SUCCESS: Isort check successful!
 --- /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.223354+00:00
 +++ /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.405500+00:00
 @@ -44,11 +44,15 @@
              {
                  "files": [
                      {"path": "/etc/config/network", "mode": "0644", "contents": ""},
                      {"path": "etc/openvpn/client.conf", "mode": "0644", "contents": ""},
                      {"path": "{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 -                    {"path": "/etc/{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 +                    {
 +                        "path": "/etc/{{cert_path_abc123}}",
 +                        "mode": "0644",
 +                        "contents": "",
 +                    },
                  ]
              }
          )
          b.validate()
 ERROR: Black check failed! Hint: did you forget to run openwisp-qa-format?
 ./netjsonconfig/backends/base/backend.py:203:26: E203 whitespace before ':'
 ERROR: Flake8 check failed!
 SUCCESS: ReStructuredText check successful!
 Commit validation: successful!
 File manage.py not found, skipping Make Migration Check.
 ##[error]Process completed with exit code 1.

GitHub Actions: Netjsonconfig CI Build / Python==3.12: [fix] Validated extra file paths #400

Conclusion: failure

View job details

##[group]Run ./run-qa-checks
 �[36;1m./run-qa-checks�[0m
 shell: /usr/bin/bash -e {0}
 env:
   pythonLocation: /opt/hostedtoolcache/Python/3.12.13/x64
   PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.13/x64/lib/pkgconfig
   Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
   Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
   Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.13/x64
   LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.13/x64/lib
 ##[endgroup]
 SUCCESS: Blank endline check successful!
 SUCCESS: Isort check successful!
 --- /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.223354+00:00
 +++ /home/runner/work/netjsonconfig/netjsonconfig/tests/test_base.py	.405500+00:00
 @@ -44,11 +44,15 @@
              {
                  "files": [
                      {"path": "/etc/config/network", "mode": "0644", "contents": ""},
                      {"path": "etc/openvpn/client.conf", "mode": "0644", "contents": ""},
                      {"path": "{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 -                    {"path": "/etc/{{cert_path_abc123}}", "mode": "0644", "contents": ""},
 +                    {
 +                        "path": "/etc/{{cert_path_abc123}}",
 +                        "mode": "0644",
 +                        "contents": "",
 +                    },
                  ]
              }
          )
          b.validate()
 ERROR: Black check failed! Hint: did you forget to run openwisp-qa-format?
 ./netjsonconfig/backends/base/backend.py:203:26: E203 whitespace before ':'
 ERROR: Flake8 check failed!
 SUCCESS: ReStructuredText check successful!
 Commit validation: successful!
 File manage.py not found, skipping Make Migration Check.
 ##[error]Process completed with exit code 1.
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{py,html}

📄 CodeRabbit inference engine (Custom checks)

Mark all user-facing strings as translatable using the Django i18n framework in Django pull requests

Files:

  • tests/test_base.py
  • netjsonconfig/backends/base/backend.py
🧠 Learnings (1)
📚 Learning: 2026-03-13T05:53:38.499Z
Learnt from: stktyagi
Repo: openwisp/netjsonconfig PR: 355
File: tests/openwrt/test_default.py:0-0
Timestamp: 2026-03-13T05:53:38.499Z
Learning: Enforce importing ValidationError from netjsonconfig.exceptions instead of jsonschema.exceptions across the codebase. This aligns with project conventions (including tests like tests/openwrt/test_default.py) and should be validated by CI. When reviewing Python files, flag any imports like from jsonschema.exceptions import ValidationError and suggest from netjsonconfig.exceptions import ValidationError (or equivalent relative import) to maintain consistency.

Applied to files:

  • tests/test_base.py
  • netjsonconfig/backends/base/backend.py
🪛 GitHub Actions: Netjsonconfig CI Build / 1_Python==3.10.txt
netjsonconfig/backends/base/backend.py

[error] 203-203: Black check failed (formatting). Hint: did you forget to run openwisp-qa-format?


[error] 203-203: Flake8 check failed: E203 whitespace before ':'.

🪛 GitHub Actions: Netjsonconfig CI Build / 2_Python==3.13.txt
netjsonconfig/backends/base/backend.py

[error] 203-203: Black check failed. Hint: did you forget to run openwisp-qa-format?


[error] 203-203: Flake8 check failed: E203 whitespace before ':'.

🪛 GitHub Actions: Netjsonconfig CI Build / 3_Python==3.11.txt
netjsonconfig/backends/base/backend.py

[error] 203-203: Flake8/pycodestyle reported: E203 whitespace before ':' at line 203 column 26.

🪛 GitHub Actions: Netjsonconfig CI Build / 4_Python==3.12.txt
netjsonconfig/backends/base/backend.py

[error] 203-203: Black check failed. Hint: did you forget to run openwisp-qa-format?


[error] 203-203: Flake8 check failed: E203 whitespace before ':'.

🪛 GitHub Actions: Netjsonconfig CI Build / Python==3.10
netjsonconfig/backends/base/backend.py

[error] 203-203: Flake8 check failed: E203 whitespace before ':'

🪛 GitHub Actions: Netjsonconfig CI Build / Python==3.11
tests/test_base.py

[error] 44-49: Black check failed for step './run-qa-checks'. Hint: did you forget to run openwisp-qa-format? Formatting mismatch in test data structure (dict/list formatting around the '/etc/{{cert_path_abc123}}' entry).

netjsonconfig/backends/base/backend.py

[error] 203-203: Flake8/pycodestyle error: E203 whitespace before ':'. (at :203:26) Flake8 check failed in step './run-qa-checks'.

🪛 GitHub Actions: Netjsonconfig CI Build / Python==3.12
netjsonconfig/backends/base/backend.py

[error] 203-203: Black check failed. Hint: did you forget to run openwisp-qa-format?


[error] 203-203: Black/formatting error: E203 whitespace before ':'.

🪛 GitHub Actions: Netjsonconfig CI Build / Python==3.13
netjsonconfig/backends/base/backend.py

[error] 203-203: Black check failed. Hint: did you forget to run openwisp-qa-format?


[error] 203-203: Black/formatting reported: E203 whitespace before ':'.

🔇 Additional comments (2)
netjsonconfig/backends/base/backend.py (1)

19-22: LGTM!

Also applies to: 165-167, 192-215

tests/test_base.py (1)

7-12: LGTM!

Also applies to: 41-75

Comment thread netjsonconfig/backends/base/backend.py
@coveralls

coveralls commented Jul 20, 2026

Copy link
Copy Markdown

Coverage Status

coverage: 99.152% (+0.009%) from 99.143% — issues/400-reject-invalid-file-paths into master

@nemesifier

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
netjsonconfig/backends/base/backend.py (2)

179-183: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Reject multiple leading slashes as empty path components.

lstrip("/") removes all leading separators, so //etc/passwd and ///etc/passwd pass the component check. _process_files() strips only one slash, leaving an absolute archive member path.

Proposed fix
-            components = path.lstrip("/").split("/")
+            components = (
+                path[1:].split("/") if path.startswith("/") else path.split("/")
+            )
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@netjsonconfig/backends/base/backend.py` around lines 179 - 183, Update the
path component validation in _process_files so leading separators are not all
removed before validation; preserve enough of the original path to detect empty
components created by multiple leading slashes, while retaining valid
single-leading-slash handling. Ensure paths such as //etc/passwd and
///etc/passwd are rejected before archive processing.

204-215: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Validate placeholder bodies before normalizing file paths. netjsonconfig/backends/base/backend.py:204-215 The current check accepts any {{...}} span, so {{}}, {{foo;reboot}}, or {{foo/bar}} collapse to x and pass _file_path_re. Restrict the placeholder body to the documented \w+ form, allowing only surrounding whitespace.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@netjsonconfig/backends/base/backend.py` around lines 204 - 215, Update the
placeholder handling in the file-path validation loop to inspect the body
between `{{` and `}}` before replacing it with `x`. Accept only a nonempty `\w+`
placeholder with optional surrounding whitespace, reject bodies containing
separators, semicolons, or other characters, and preserve the existing
`_file_path_re` validation for the normalized path.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@netjsonconfig/backends/base/backend.py`:
- Around line 179-183: Update the path component validation in _process_files so
leading separators are not all removed before validation; preserve enough of the
original path to detect empty components created by multiple leading slashes,
while retaining valid single-leading-slash handling. Ensure paths such as
//etc/passwd and ///etc/passwd are rejected before archive processing.
- Around line 204-215: Update the placeholder handling in the file-path
validation loop to inspect the body between `{{` and `}}` before replacing it
with `x`. Accept only a nonempty `\w+` placeholder with optional surrounding
whitespace, reject bodies containing separators, semicolons, or other
characters, and preserve the existing `_file_path_re` validation for the
normalized path.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: a13a5f86-e59a-409f-a0ac-d05dfe392fd6

📥 Commits

Reviewing files that changed from the base of the PR and between a70204a and 7bbb28d.

📒 Files selected for processing (1)
  • netjsonconfig/backends/base/backend.py
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{py,html}

📄 CodeRabbit inference engine (Custom checks)

Mark all user-facing strings as translatable using the Django i18n framework in Django pull requests

Files:

  • netjsonconfig/backends/base/backend.py
🧠 Learnings (1)
📚 Learning: 2026-03-13T05:53:38.499Z
Learnt from: stktyagi
Repo: openwisp/netjsonconfig PR: 355
File: tests/openwrt/test_default.py:0-0
Timestamp: 2026-03-13T05:53:38.499Z
Learning: Enforce importing ValidationError from netjsonconfig.exceptions instead of jsonschema.exceptions across the codebase. This aligns with project conventions (including tests like tests/openwrt/test_default.py) and should be validated by CI. When reviewing Python files, flag any imports like from jsonschema.exceptions import ValidationError and suggest from netjsonconfig.exceptions import ValidationError (or equivalent relative import) to maintain consistency.

Applied to files:

  • netjsonconfig/backends/base/backend.py
🔇 Additional comments (1)
netjsonconfig/backends/base/backend.py (1)

19-22: LGTM!

Also applies to: 165-168, 188-189

@kilo-code-bot

kilo-code-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • docs/source/backends/openwrt.rst - Documentation update for file path validation rules
  • netjsonconfig/backends/base/backend.py - Added file path validation in validate()
  • tests/test_base.py - Added tests for valid and invalid file paths

Reviewed by step-3.7-flash · Input: 65.1K · Output: 4.2K · Cached: 173.1K

@nemesifier

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@nemesifier

Copy link
Copy Markdown
Member Author

@coderabbitai resolve.

@github-project-automation github-project-automation Bot moved this from In progress to Reviewer approved in OpenWISP Priorities for next releases Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

@nemesifier: Resolving my review comments on this PR.

✅ Action performed

Comments resolved and changes approved.

@nemesifier
nemesifier merged commit 35bab79 into master Jul 21, 2026
13 checks passed
@nemesifier
nemesifier deleted the issues/400-reject-invalid-file-paths branch July 21, 2026 16:06
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in OpenWISP Priorities for next releases Jul 21, 2026
@github-project-automation github-project-automation Bot moved this from In progress to Done in 26.06 Release Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

[bug] Validate extra file paths in configuration schema

2 participants