#4259 Validate SVN import url

v1.0.0
closed
sf-2 (995)
SCM
2015-08-20
2012-05-21
No

When import svn repos (using the tool's admin menu), we should validate the input. This error can happen if it is blank. We should also validate that it's a real url. Limit to http(s) and svn (if that works).

Traceback (most recent call last):
 File "/var/local/allura/Allura/allura/tasks/repo_tasks.py", line 31, in clone
   cloned_from_url)
 File "/var/local/allura/Allura/allura/model/repository.py", line 227, in init_as_clone
   self._impl.clone_from(source_url)
 File "/var/local/allura/ForgeSVN/forgesvn/model/svn.py", line 176, in clone_from
   subprocess.check_call(['svnsync', 'init', self._url, source_url])
 File "/usr/lib64/python2.7/subprocess.py", line 506, in check_call
   retcode = call(*popenargs, **kwargs)
 File "/usr/lib64/python2.7/subprocess.py", line 493, in call
   return Popen(*popenargs, **kwargs).wait()
 File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
   errread, errwrite)
 File "/usr/lib64/python2.7/subprocess.py", line 1228, in _execute_child
   raise child_exception
TypeError: execv() arg 2 must contain only strings

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-06-01
    • size: --> 2
     
  • Jenny Steele

    Jenny Steele - 2012-06-06
    • status: open --> in-progress
    • assigned_to: Jenny Steele
     
  • Jenny Steele

    Jenny Steele - 2012-06-06
    • status: in-progress --> code-review
    • qa: Tim Van Steenburgh
    • component: General --> SCM
     
  • Jenny Steele

    Jenny Steele - 2012-06-06

    On allura js/4259. To test, confirm that a validation error occurs if you submit the svn repo import form with no url or a url that doesn't start with http/https/svn

     
  • Tim Van Steenburgh

    • status: code-review --> closed
     

Log in to post a comment.