Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/Edit dashlet not possible #4970

Closed
staypekos opened this issue Jan 5, 2023 · 2 comments · Fixed by #4972
Closed

Add/Edit dashlet not possible #4970

staypekos opened this issue Jan 5, 2023 · 2 comments · Fixed by #4972
Labels
area/dashboard Affects the dashboard bug Something isn't working
Milestone

Comments

@staypekos
Copy link

Describe the bug

The add form ends with failure "The url must not be external." no matter what is used as url. Same as update form even without any change.

The problem is probably in InternalUrlValidator#21.

As I remember the relative url (e.g. monitoring/tactical; without initial /) worked to add dashlet (was also possible to finish with full url, but the dashlet does not work after that). AFAIK relative url does not have the scheme so it's not good idea to compare it with app scheme.
Tested scenarios (URL -> result):
monitoring/tactical -> fail on second part (scheme is NULL)
/monitoring/tactical -> fail on first part (relativeUrl is empty string)
https://monitoring/tactical -> "works" - add new dashlet which is not working, because getRelativeUrl() returns only "tactical"
https://icinga.company.my/monitoring/tactical -> still fail on first part (relativeUrl is empty string) (maybe here is the mistake for much longer time?)

To Reproduce

  1. Go to Dashboard -> Add Dashlet
  2. Fill required fields
  3. Push "Add To Dashboard" button

or

  1. Go to Dashboard -> Settings
  2. Select dashlet to edit
  3. Push "Update Dashlet" button

Expected behavior

The form accepts some relative or absolute url.

Screenshots

image

Your Environment

  • Icinga Web 2 version and modules (System - About): 2.11.3
  • Web browser used: Google Chrome 108
  • Icinga 2 version used (icinga2 --version): r2.13.6-1
  • PHP version used (php --version): 7.4.33
  • Server operating system and version: Debian 11
@ValeDaRold
Copy link
Contributor

Hi!
We encountered the same problem also with Icingaweb2 version 2.10.4.

ValeDaRold added a commit to WuerthPhoenix/icingaweb2 that referenced this issue Jan 9, 2023
@nilmerg nilmerg added bug Something isn't working area/dashboard Affects the dashboard labels Jan 10, 2023
@tbauriedel
Copy link
Member

ref/NC/773400

@nilmerg nilmerg linked a pull request Jan 11, 2023 that will close this issue
nilmerg pushed a commit that referenced this issue Jan 11, 2023
nilmerg pushed a commit that referenced this issue Jan 12, 2023
nilmerg pushed a commit that referenced this issue Jan 12, 2023
nilmerg pushed a commit that referenced this issue Jan 12, 2023
@nilmerg nilmerg added this to the 2.11.4 milestone Jan 12, 2023
@nilmerg nilmerg pinned this issue Jan 18, 2023
@flourish86 flourish86 unpinned this issue Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dashboard Affects the dashboard bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants