[GH-ISSUE #7] Error when saving new file #5

Closed
opened 2026-05-06 12:22:34 +02:00 by BreizhHardware · 4 comments

Originally created by @wolfnacht44 on GitHub (Apr 5, 2026).
Original GitHub issue: https://github.com/chr0nzz/traefik-manager/issues/7

Originally assigned to: @chr0nzz on GitHub.

Think I hit a bug

Linux Native: v0.10.0
OS: Ubuntu 24.04.4LTS

app kicking back an error when trying to save a middleware or route as a "new file".

Error one, it defaults to the first file it finds, then when removing and resaving as a NEW file
the action errors out, and journalctl reports _is_safe_path is not defined.

gunicorn[3339]: 2026-04-05 17:18:31,722 [ERROR] [traefik-manager] Error saving configuration
gunicorn[3339]: Traceback (most recent call last):
gunicorn[3339]: File "/opt/traefik-manager/app.py", line 1816, in save_entry
gunicorn[3339]: target_path = _resolve_config_path(config_file_raw) or CONFIG_PATH
gunicorn[3339]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gunicorn[3339]: File "/opt/traefik-manager/app.py", line 152, in _resolve_config_path
gunicorn[3339]: if _is_safe_path(candidate):
gunicorn[3339]: ^^^^^^^^^^^^^
gunicorn[3339]: NameError: name '_is_safe_path' is not defined

Originally created by @wolfnacht44 on GitHub (Apr 5, 2026). Original GitHub issue: https://github.com/chr0nzz/traefik-manager/issues/7 Originally assigned to: @chr0nzz on GitHub. Think I hit a bug Linux Native: v0.10.0 OS: Ubuntu 24.04.4LTS app kicking back an error when trying to save a middleware or route as a "new file". Error one, it defaults to the first file it finds, then when removing and resaving as a NEW file the action errors out, and journalctl reports _is_safe_path is not defined. gunicorn[3339]: 2026-04-05 17:18:31,722 [ERROR] [traefik-manager] Error saving configuration gunicorn[3339]: Traceback (most recent call last): gunicorn[3339]: File "/opt/traefik-manager/app.py", line 1816, in save_entry gunicorn[3339]: target_path = _resolve_config_path(config_file_raw) or CONFIG_PATH gunicorn[3339]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ gunicorn[3339]: File "/opt/traefik-manager/app.py", line 152, in _resolve_config_path gunicorn[3339]: if _is_safe_path(candidate): gunicorn[3339]: ^^^^^^^^^^^^^ gunicorn[3339]: NameError: name '_is_safe_path' is not defined
BreizhHardware 2026-05-06 12:22:34 +02:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@chr0nzz commented on GitHub (Apr 5, 2026):

found the issue, give me a minute and ill push an update

<!-- gh-comment-id:4189235881 --> @chr0nzz commented on GitHub (Apr 5, 2026): found the issue, give me a minute and ill push an update
Author
Owner

@wolfnacht44 commented on GitHub (Apr 5, 2026):

Yes, Line 152 in app.py, replaced _is_safe_path with _safe_file_path fixed it locally.

<!-- gh-comment-id:4189237715 --> @wolfnacht44 commented on GitHub (Apr 5, 2026): Yes, Line 152 in app.py, replaced _is_safe_path with _safe_file_path fixed it locally.
Author
Owner

@chr0nzz commented on GitHub (Apr 5, 2026):

please update to v0.10.1

and let me know if it solved the issue

<!-- gh-comment-id:4189242659 --> @chr0nzz commented on GitHub (Apr 5, 2026): please update to v0.10.1 and let me know if it solved the issue
Author
Owner

@wolfnacht44 commented on GitHub (Apr 5, 2026):

Update resolved the issue. I got another coming at you shortly.

<!-- gh-comment-id:4189253048 --> @wolfnacht44 commented on GitHub (Apr 5, 2026): Update resolved the issue. I got another coming at you shortly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/traefik-manager#5
No description provided.