zaproxy / zap-hud

The ZAP Heads Up Display (HUD)
Apache License 2.0
250 stars 151 forks source link

No check if the Base Directory Path is filled when enable HUD is checked. Leading to HUD not starting #826

Open globeone opened 3 years ago

globeone commented 3 years ago

Describe the bug On the Weekly version of ZAP the HUD hasn't loaded in the browser for the last 4 or so weeks of versions. The HUD is enabled.

To Reproduce Steps to reproduce the behavior:

  1. Go to Manual Explore 1a. Enter a url "https://example.org"
  2. Click on enable HUD
  3. Scroll down to Chrome or Firefox 3a. Click on Launch Browser
  4. See no HUD

Expected behavior When launching the HUD, the HUD should show up in the browser

Screenshots 2020-10-30_OWASP ZAP-D-2020-10-26_HUDSettings 2020-10-29_OWASP ZAP D-2020-10-26-ChromeNoHud800x561 2020-10-29_OWASP ZAP D-2020-10-26-Firefox_No_HUD_800x604

Software versions

Errors from the zap.log file D2020-10-26_ZAPHUD_injectionhtmlNotFound.txt

Additional context In the log file we see that the relative path to injectionHtml.html is incorrect. Java then defaults to a absolute path of No such file C:\target\injectionHtml.html that doesn't exist. the absolute path being (for the weekly version) C:\Users\$USER\OWASP ZAP_D\hud\target\

Would you like to help fix this issue? Happy to test and report bugs.

psiinon commented 3 years ago

Strictly speaking this looks like a local config issue, but no problem with trying to fix invalid or missing paths.

globeone commented 3 years ago

So, there is no check if the Base Directory is blank in the options.

It would be desirable to have a check if the Base Directory field is filled when the 'enable HUD' option is checked to prevent this issue from occurring in the future.

psiinon commented 3 years ago

Agreed :)