Modify

Opened 15 years ago

Closed 15 years ago

#5822 closed defect (fixed)

IndexError: string index out of range

Reported by: oliver.mueller@… Owned by: robert_martin
Priority: high Component: FineGrainedPageAuthzEditorPlugin
Severity: critical Keywords:
Cc: Trac Release: 0.11

Description

The following error message:

"IndexError: string index out of range"

comes up when I click on "Page Permission" in the trac administration.

trac release 11.5

trace back: File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 444, in _dispatch_request

dispatcher.dispatch(req)

File "/usr/lib/python2.5/site-packages/trac/web/main.py", line 205, in dispatch

resp = chosen_handler.process_request(req)

File "/usr/lib/python2.5/site-packages/trac/admin/web_ui.py", line 114, in process_request

path_info)

File "/usr/lib/python2.5/site-packages/PageAuthzPolicyEditor-0.12dev_r6511-py2.5.egg/page_authz_policy_editor/pape_admin.py", line 102, in render_admin_panel

group_details = self._get_groups_and_members()

File "/usr/lib/python2.5/site-packages/PageAuthzPolicyEditor-0.12dev_r6511-py2.5.egg/page_authz_policy_editor/pape_admin.py", line 79, in _get_groups_and_members

group_file_name = self._group_filename()

File "/usr/lib/python2.5/site-packages/PageAuthzPolicyEditor-0.12dev_r6511-py2.5.egg/page_authz_policy_editor/pape_admin.py", line 59, in _group_filename

group_file_name = self._get_filename('account-manager', 'group_file')

File "/usr/lib/python2.5/site-packages/PageAuthzPolicyEditor-0.12dev_r6511-py2.5.egg/page_authz_policy_editor/pape_admin.py", line 51, in _get_filename

if (not file_name.startswith(os.path.sep)) and (not file_name[1] == (':')):

Attachments (0)

Change History (1)

comment:1 Changed 15 years ago by robert_martin

Resolution: fixed
Status: newclosed

In the _get_filename function it now checks the length of the filename first, as it maybe 0 length depending on the section the filename is given under.

What may also be of interest for editing group files is: http://trac-hacks.org/ticket/5791

I haven't had a response from the cliechti, so I may need to start a new hack and change the name. This version will also automatically apply changes to the group memberships.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain robert_martin.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.