Failed REST uploads expose internal error details
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu với trình xử lý tải lên được mô tả trong issue và fixture UploadAPITestCase hiện có. Theo dõi cách StorageError, OSError và ImproperlyConfigured được chuyển thành phản hồi HTTP 400, sau đó chạy các bài kiểm tra API tải lên. Hoàn tất khi các lỗi trả về một thông báo cố định mà không để lộ chi tiết ngoại lệ, trong khi lỗi gốc vẫn có trong log.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Plugin Version
v0.0.1
NetBox Version
v4.7.4
Python Version
3.12
Steps to Reproduce
- Create a Script Project with source type Upload.
- In a local API test, patch the configured
netbox_scriptsstorage backend'ssave()method to raise:PermissionError( 13, 'Permission denied', '/srv/netbox/private/deploy.py', ) - As a user with permission to change the Project and add Script Files, POST a Python source file as multipart form data to
/api/plugins/netbox-scripts/projects/<id>/upload/.
This was reproduced using the existing UploadAPITestCase fixture and a mocked backend failure.
Expected Behavior
The upload returns HTTP 400 with a fixed message, such as “The upload could not be stored.” The underlying exception and traceback are logged for troubleshooting.
Configuration failures should also return a fixed message without including internal exception details.
Observed Behavior
The response is HTTP 400, but its detail includes the storage exception's message, including the internal path:
[Errno 13] Permission denied: '/srv/netbox/private/deploy.py'
A failure from the backend's save() method also includes the generated storage key.
The upload handler formats caught StorageError and OSError exceptions into the response. Its adjacent ImproperlyConfigured handler returns the exception text directly, which can include internal details from a failed NetBox Branching routing check.
- Ngôn ngữ chính
- Python
- Star
- 8
- Fork
- 0
- Merge trung bình
- 11 giờ 23 phút
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của netbox-community/netbox-scripts
-
app: scripts severity: low status: backlog type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
netbox-community/netbox-scripts#94 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts severity: medium status: backlog type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
netbox-community/netbox-scripts#83 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts status: backlog type: documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
netbox-community/netbox-scripts#80 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts severity: medium status: backlog type: bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
netbox-community/netbox-scripts#79 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
app: scripts severity: low status: backlog type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
netbox-community/netbox-scripts#76 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của netbox-community/netbox-scripts
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
BCDA-APS/polar-bits#93 ·
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejectedCó thể đã có người làm @Steve-20-ai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] - ssh_config `Match tagged` statement always appliesCó thể đã có người làm @AtharvRG đã nhận hôm nay. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
paramiko/paramiko#2715 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 9 ngày
-
auto-rejected intake mcp-intake needs-salvage priority:high type:feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Ikalus1988/MisakaNet#4221 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày