[ZBX-2326] Graph title contains %2F instead of / Created: 2010 Apr 15  Updated: 2017 May 30  Resolved: 2010 May 19

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 1.8.2
Fix Version/s: None

Type: Incident report Priority: Major
Reporter: Alixen Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File chart3.php.patch    

 Description   

Graph titles are sometimes urlencoded:
For example, "IO /dev/sda" is replaced by "IO %2Fdev%2Fsda"

This happens when graph title is passed in URL parameters:
/chart3.php?graphid=310&name=IO+%252Fdev%252Fsda



 Comments   
Comment by Alixen [ 2010 Apr 15 ]

Attached patch corrects this bug

Comment by Maxim Andruhovich (Inactive) [ 2010 May 18 ]

Please, tell us your PHP version, HTTP Server name and version, OS name and version + client browser version.

In PHP superglobals $_GET and $_REQUEST are already decoded.

See php function 'urldecode' manual (Warning)
http://php.net/manual/en/function.urldecode.php

Comment by Alixen [ 2010 May 18 ]

Configuration:
==========
OS : Linux Debian Lenny (5.0)
HTTP Server : Apache 2.2.9 (from debian distribution)
PHP 5.2.6 (from debian distribution)
Zabbix 1.8.2
Browser : Firefox 3.6.3 (Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3)

How to reproduce:
==============
In Configuration/Screens:
Create a graph in a template named "IO /dev/sda"
Create a screen that includes graph above and select "Dynamic item" in graph configuration

In Monitoring/Screens:
Select this screen
Screen is displayed and graph is correctly labeled "IO /dev/sda"
In "Host" dropdown list (top left) select an host different from "Default"
Screen is redisplayed and graph is incorrectly labeled "IO %252Fdev%252Fsda"

It seems that in this scenario, URL is encoded twice.

Hope this helps
Alixen

Comment by Maxim Andruhovich (Inactive) [ 2010 May 19 ]

Thank you for reporting this bug it was fixed in version 1.8.3 but this fix produced new bug which not affects string types used in your title, but produced new problem with ampersands, which I just fixed as well.

Now everything should work fine. All symbols should displayed correctly. Check this bug development branch and confirm the fix:

this bug development branch is:
svn://svn.zabbix.com/branches/dev/ZBX-2326

Comment by Alixen [ 2010 May 19 ]

Hi Maxim,

I have extracted ZBX-2236 from svn and tried it.
I can confirm that this but is fixed.

My patch was a quick and dirty fix to keep my users happy.
I suspected that it could have some side effects.

Thank you for your work.
Alixen

Comment by Alexei Vladishev [ 2010 May 20 ]

Great! I am closing it.

Comment by Maxim Andruhovich (Inactive) [ 2010 May 21 ]

Bug fixed in version pre 1.8.3 revision 12135

Generated at Sat Apr 20 14:24:24 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.