~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/common/studpath.py

  • Committer: mattgiuca
  • Date: 2008-01-09 03:23:58 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:134
Added module: common/makeuser.py. Creates a new user jail by hardlinking the
jail template.
Added script: trunk/makeuser.py. Command-line script to run the above module
and create a user.

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
    """
49
49
    # First normalise the path
50
50
    urlpath = os.path.normpath(urlpath)
51
 
    # Now if it begins with ".." or separator, then it's illegal
52
 
    if urlpath.startswith("..") or urlpath.startswith(os.sep):
 
51
    # Now if it begins with ".." then it's illegal
 
52
    if urlpath.startswith(".."):
53
53
        return (None, None)
54
54
    # Note: User can be a group name. There is absolutely no difference in our
55
55
    # current directory scheme.