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

Can not delete monitored tag if it contains forward slash (/) #1093

Closed
sgotre opened this issue Nov 10, 2021 · 1 comment · Fixed by #1196
Closed

Can not delete monitored tag if it contains forward slash (/) #1093

sgotre opened this issue Nov 10, 2021 · 1 comment · Fixed by #1196

Comments

@sgotre
Copy link
Contributor

sgotre commented Nov 10, 2021

  • Horizon Version: 5.7.15
  • Laravel Version: 8.70.2
  • PHP Version: 8.0.10

Description:

When monitoring a Tag which contains Slashes it is impossible to remove it again.

Steps To Reproduce:

  • open Horizon Monitoring /horizon/monitoring
  • click on Monitor Tag Button
  • enter any string containing a slash. For example 123/123
  • delete the tag by clicking on the small delete icon
  • the DELETE Request responds with 405 Method not allowed because the route params is not recognized correctly

Reason

Forward Slashes have to be allowed explicitly in route params:

Suggested Solution

    Route::delete('/monitoring/{tag}', 'MonitoringController@destroy')->name('horizon.monitoring-tag.destroy');

could be

    Route::delete('/monitoring/{tag}', 'MonitoringController@destroy')
        ->name('horizon.monitoring-tag.destroy')
        ->where('tag', '.*');

I will submit a PR if you want.

Thank you for your time and effor!

@driesvints
Copy link
Member

This indeed isn't possible right now. Feel free to attempt a PR if you want. Thanks

sgotre pushed a commit to teraone/horizon that referenced this issue Oct 9, 2022
taylorotwell pushed a commit that referenced this issue Oct 10, 2022
…1196)

* fix #1093, delete tags which contain forward slashes

* remove double ;

Co-authored-by: Stefan Gotre <stefan.gotre@teraone.de>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants