Modify ↓
#5689 closed defect (fixed)
empty path input corrupts svnauthz => trac aborts
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Component: | SvnAuthzAdminPlugin |
Severity: | normal | Keywords: | |
Cc: | Ryan J Ollos | Trac Release: | 0.11 |
Description
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 15 years ago by
Cc: | Ryan J Ollos added; anonymous removed |
---|
comment:2 Changed 14 years ago by
comment:3 Changed 14 years ago by
I made a Q&D solution to solve this problem : edit the "admin_ui.py" 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() else: repository = self.authz_module path = tmppath.strip() if not path : return {} try: self.authz.add_path(Path(path, [], repository)) return {} except Exception, e: return {'addpath_error' : e}
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 Changed 10 years ago by
Owner: | changed from Kis Gergely to Ryan J Ollos |
---|
Note: See
TracTickets for help on using
tickets.
#6265 was closed as a duplicate.