Opened 7 years ago

Closed 4 years ago

Last modified 18 months ago

#5689 closed defect (fixed)

empty path input corrupts svnauthz => trac aborts

Reported by: A.Visser@… Owned by: rjollos
Priority: normal Component: SvnAuthzAdminPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.11


If "Add a new Subversion path." is invoked without entering a path, an empty path is appended to svnauthz which causes trac to abort. So the project administrator can't undo the mistake, the empty path has to be removed manually by the system administrator.

Attachments (0)

Change History (6)

comment:1 Changed 7 years ago by rjollos

  • Cc rjollos added; anonymous removed

comment:2 Changed 6 years ago by rjollos

#6265 was closed as a duplicate.

comment:3 Changed 6 years ago by laurent.foynard@…

I made a Q&D solution to solve this problem : edit the "" file and in the method "_add_path" just before the "try" add the following lines :

if not path :
    return {}

Finally the method looks like this :

    def _add_path(self, req):
        path = req.args.get('path')
        repository = None
        tmppath = req.args.get('path') 
    if ":" in tmppath: 
        repository, path = tmppath.split(":") 
        repository = repository.strip() 
        path = path.strip() 
        repository = self.authz_module 
        path = tmppath.strip() 
        if not path :
            return {}
            self.authz.add_path(Path(path, [], repository))
        return {}
        except Exception, e:
            return {'addpath_error' :  e}

comment:4 Changed 4 years ago by rjollos

  • Resolution set to fixed
  • Status changed from new to closed

(In [11873]) Fixes #5689:

  • Added checks for non-empty group and path before attempting to add them. A warning is added if either are empty.
  • Extracted code to a method _get_authz.
  • Corrected tabs and indentation.

comment:5 Changed 18 months ago by rjollos

  • Owner changed from kisg to rjollos

comment:6 Changed 18 months ago by rjollos

#10546 closed as a duplicate.

Add Comment

Modify Ticket

as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.