mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 08:03:30 +02:00
Added urldecode for ports in API to deal with slashes in port names
This commit is contained in:
@@ -90,12 +90,15 @@ Next, add the following to `/etc/apache2/sites-available/librenms.conf`:
|
|||||||
ServerName librenms.example.com
|
ServerName librenms.example.com
|
||||||
CustomLog /opt/librenms/logs/access_log combined
|
CustomLog /opt/librenms/logs/access_log combined
|
||||||
ErrorLog /opt/librenms/logs/error_log
|
ErrorLog /opt/librenms/logs/error_log
|
||||||
|
AllowEncodedSlashes On
|
||||||
<Directory "/opt/librenms/html/">
|
<Directory "/opt/librenms/html/">
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options FollowSymLinks MultiViews
|
Options FollowSymLinks MultiViews
|
||||||
</Directory>
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
If you are running Apache 2.2.18 or higher then change AllowEncodedSlashes to NoDecode
|
||||||
|
|
||||||
If you have Apache 2.3 or newer then please add the following line before `AllowOverride All`:
|
If you have Apache 2.3 or newer then please add the following line before `AllowOverride All`:
|
||||||
|
|
||||||
Require all granted
|
Require all granted
|
||||||
|
|||||||
@@ -101,12 +101,15 @@ Next, add the following to `/etc/httpd/conf.d/librenms.conf`
|
|||||||
ServerName librenms.example.com
|
ServerName librenms.example.com
|
||||||
CustomLog /opt/librenms/logs/access_log combined
|
CustomLog /opt/librenms/logs/access_log combined
|
||||||
ErrorLog /opt/librenms/logs/error_log
|
ErrorLog /opt/librenms/logs/error_log
|
||||||
|
AllowEncodedSlashes On
|
||||||
<Directory "/opt/librenms/html/">
|
<Directory "/opt/librenms/html/">
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
Options FollowSymLinks MultiViews
|
Options FollowSymLinks MultiViews
|
||||||
</Directory>
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
|
If you are running Apache 2.2.18 or higher then change AllowEncodedSlashes to NoDecode
|
||||||
|
|
||||||
Don't forget to restart Apache to make this active:
|
Don't forget to restart Apache to make this active:
|
||||||
|
|
||||||
service httpd restart
|
service httpd restart
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ function get_graph_by_port()
|
|||||||
$router = $app->router()->getCurrentRoute()->getParams();
|
$router = $app->router()->getCurrentRoute()->getParams();
|
||||||
$device_id = $router['id'];
|
$device_id = $router['id'];
|
||||||
$vars = array();
|
$vars = array();
|
||||||
$vars['port'] = $router['port'];
|
$vars['port'] = urldecode($router['port']);
|
||||||
$vars['type'] = $router['type'] ?: 'port_bits';
|
$vars['type'] = $router['type'] ?: 'port_bits';
|
||||||
if(!empty($router['from']))
|
if(!empty($router['from']))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user