cylab-tw / bluelight

a browser-based DICOM viewer
MIT License
117 stars 45 forks source link

Avoid retrieving all image from the server with arbitrary parameters #17

Closed cylien closed 1 year ago

cylien commented 1 year ago

problem description

in start.html, adding query pentameters that are not defined in DICOMweb will cause a query of all metadata from a DICOMweb server. In this situation, BL will retrieve all images from the server. for example, as the following URL, the QIDO request will get all metadata of the DICOM objects in the server.

https://{host}/bluelight/bluelight/html/start.html?session_code=xxx

solution

  1. adding a white list of query parameters before sending QIDO request to a server, filtering the undefined query parameters to avoid the situation described above.
  2. after step 1, check the QIDO request if the request has no query parameter, then stop to query the server.

Adding a while list of the query parameters in QIDO

cylien commented 1 year ago

8770cc38279eed76a49f399bb0ca2fc779ed0016