Modify

Opened 9 years ago

Closed 6 years ago

#3343 closed defect (fixed)

[patch] Error onClick "Remove selected accounts" when no account is selected

Reported by: Eli Iser Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: minor Keywords: user admin
Cc: John Hampton Trac Release: 0.11

Description

Clicking "Remove selected accounts" when no account is selected leads to an error.

Attachments (1)

20100926_acct_mgr-fix_3343.patch (852 bytes) - added by Steffen Hoffmann 6 years ago.
simple check for empty argument

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by Steffen Hoffmann

Cc: John Hampton added; anonymous removed
Keywords: user admin added
Summary: "Remove selected accounts" when no account is selected[patch] Error onClick "Remove selected accounts" when no account is selected

Confirmed, this is still true for trunk version with Trac 0.12.

It throws an AttributeError: 'NoneType' object has no attribute 'lower'

File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request
  dispatcher.dispatch(req)
File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch
  resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/trac/admin/web_ui.py", line 116, in process_request
  path_info)
File "build/bdist.linux-i686/egg/acct_mgr/admin.py", line 117, in render_admin_panel
  return self._do_users(req)
File "build/bdist.linux-i686/egg/acct_mgr/admin.py", line 201, in _do_users
  self.account_manager.delete_user(account)
File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 190, in delete_user
  store = self.find_user_store(user)
File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 259, in find_user_store
  user = ignore_auth_case and user.lower() or user

A simple check for empty argument list inside the delete handler should be sufficient. See the patch, that I'll attach in a minute.

Changed 6 years ago by Steffen Hoffmann

simple check for empty argument

comment:2 Changed 6 years ago by Steffen Hoffmann

Patch has been applied to current trunk version and successfully tested with Trac 0.12 right now. A click without selection does just nothing.

comment:3 in reply to:  2 Changed 6 years ago by Steffen Hoffmann

Owner: changed from Matt Good to Steffen Hoffmann
Status: newassigned

Replying to hasienda:

Patch has been applied to current trunk version and successfully tested with Trac 0.12 right now. A click without selection does just nothing.

While the application has been tested now for some weeks, commit to trunk is still pending. But I'll do it soon, and can do myself, as I've taken over maintainership recently.

comment:4 Changed 6 years ago by Steffen Hoffmann

Resolution: fixed
Status: assignedclosed

(In [9319]) AccountManagerPlugin: Add a simple input check, closes #3343.

Modify Ticket

Action
as closed The owner will remain Steffen Hoffmann.
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.