#7007 REST: install_tool:mount_point restrictions are not same as via web interface [ss6309]

Cory Johns
Chris Tsai


Following up on the cygwin-ports upgrade:

I have been unable to create Git repos via the REST API whose mount_point param contain an underscore, even though such repo names are legal and can be created via the admin/tools web interface. The cause appears to be allura/ext/admin/admin_main.py (line 776 in git master):

   if not h.re_tool_mount_point.match(mount_point) or c.project.app_instance(mount_point) is not None:
        return {'success': False,
                'info': 'Incorrect mount point name, or mount point already exists.'

Should that not be something like this instead:

   if c.project.app_instance(mount_point) is not None:
        return {'success': False,
                'info': 'Mount point already exists.'
    if not h.re_relaxed_tool_mount_point.match(mount_point):
        return {'success': False,
                'info': 'Incorrect mount point name.'

IOW, separate the errors for easier diagnosis, and more importantly, use re_relaxed_tool_mount_point to match the web interface.


  • Dave Brondsema

    Dave Brondsema - 2013-12-19
    • status: open --> code-review
  • Cory Johns - 2013-12-20
    • QA: Cory Johns
  • Cory Johns - 2013-12-20
    • status: code-review --> closed
    • assigned_to: Cory Johns
    • Size: --> 1
    • Milestone: limbo --> forge-dec-27
  • Cory Johns - 2013-12-20

    Refactored so that existing validation is used.


Log in to post a comment.