Skip to content

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

Closed
@rechl

Description

@rechl
  • 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions