Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

v4: no error is thrown when callback is set and it's a file but allowFileResources is not set to true

Đang mở
#575 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

@jszuminski đang làm issue này rồi.

Từ ngày 28/10/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug only json

When we set allowCodeExecution to false, we get The 'callback', 'resources' and 'customCode' options have been disabled for this server.

When we set allowCodeExecution to true, we get no error.

But when we set callback to a file, it silently ignores it. No error or warning is provided, that allowFileResources has to be enabled / set to true.

That is not ideal and makes debugging harder.

https://github.com/highcharts/node-export-server/blob/e7409447ab621ef4df3da5da70e67edb7b9b1707/lib/chart.js#L416

To reproduce:

highcharts-export-server --allowCodeExecution true --logToFile false --infile "....in.js" --outfile "...out.jpg" --type "jpg" --globalOptions "....globalOptions.json" --callback "some-invalid-path.js" --width 600 throws no error.

highcharts-export-server --allowCodeExecution true --logToFile false --infile "....in.js" --outfile "...out.jpg" --type "jpg" --globalOptions "....globalOptions.js" --callback "some-invalid-path.js" --allowFileResources true --width 600 throws error no such file or directory, open 'some-invalid-path.json'

Ngôn ngữ chính
JavaScript
Star
368
Fork
265
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của highcharts/node-export-server

Tất cả issue của highcharts/node-export-server

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.