Saving a MyGraph with a % in the title/vtitle does not work

Bug #784414 reported by chrismd
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Graphite
Fix Released
Undecided
Unassigned

Bug Description

Graphite 0.9.8.

1) compose a graph using '%' in the title and/or vtitle
2) save the graph
3) click on the graph in "User graphs", nothing will happen. Javascript throws a "malformed URI" error.

Removing the %25's manually from account_mygraph.url using sqlite fixes the problem.

Related branches

Revision history for this message
Jimmy (jimmyattime) wrote :

I can confirm this bug. How do you go about using sqlite to remove the %25 from the vtitle url? I have graphs that I can't delete or display now.

Revision history for this message
Jimmy (jimmyattime) wrote :

in case someone else needs to remove graphs from sqlite and is new to sqlite:

1) # sqlite3 /opt/graphite/storage/graphite.db
2) To see tables

sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main /opt/graphite/storage/graphite.db
sqlite> .tables
account_mygraph auth_user
account_profile auth_user_groups
account_variable auth_user_user_permissions
account_view dashboard_dashboard
account_window dashboard_dashboard_owners
auth_group django_admin_log
auth_group_permissions django_content_type
auth_message django_session
auth_permission

3) to see URLs

sqlite> select * from account_mygraph;

4) to delete graphs

sqlite> delete from account_mygraph where name = '<graph_name>';

Revision history for this message
Nicholas Leskiw (nleskiw) wrote :

Fixed in rev 562.

Added a sanitizing routine to composer_widgets.js to prevent users from inputting invalid characters.

Allowed chars : /[^A-Za-z0-9_.]/

Changed in graphite:
status: New → Fix Committed
Revision history for this message
Pierre Baillet (octplane) wrote :

Hi,

I've started implementing a fix for this issue which I thing cripples the application by making users believe name are used for something important although it's not really the case...

http://bazaar.launchpad.net/~octplane/graphite/url_management/revision/606

The patch contains 2 parts:

- One for the graphite composer, overriding the identifier in the extjs tree item to have a valid identifier (I'm using 'i'+md5 of the Graph name). This fixes this bug.

- One for the Dashboard composer which creates an extended version of menuInputItem which supports an extended regexp to validate the input.

Changed in graphite:
milestone: none → 0.9.10
Changed in graphite:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.