Hide Forgot
This came up while looking into https://bugzilla.redhat.com/show_bug.cgi?id=744250 I'm not sure it should have been allowed to create repositories with the relative paths: foo/bar/baz foo/bar That basically means that in the foo/bar repository, there will be a directory baz that contains an entirely separate repository. My gut feeling is that it feels wrong. Part of me feels like the user probably didn't intend that, but there may be use cases for it that I'm not realizing. I suspect this will cause problems with security in some capacity depending on which of the two are secured and how they are secured. I'm not 100% sure it's an issue, but it feels like one. This also runs the risk where the "baz" portion of the first repository conflicts with a file/directory of the same name in the foo/bar directory. Unlikely, yes, but if we allow it it's a possibility with varying degrees of brokenness resulting. Note that this is different than the case of two repositories: foo/bar/wombat foo/bar/zombie That should be allowed, the real example there being i386 and x86_64 versions of a repository.
commit a3a05c905e89ad766c9d5fe2299639c7d0b37c14 Author: Jay Dobies <jason.dobies> Date: Fri Dec 9 09:44:31 2011 -0500 Refinements to the relative path validation logic src/pulp/server/api/repo.py test/unit/test_repo_api.py = CLI output for a bad relative path = -> pulp-admin repo create --id test3 --relativepath foo/bar error: operation failed: PulpException: New relative path [foo/bar] conflicts with existing relative path [foo]; relative paths may not be a parent or child directory of another relative path = To simulate a failed migrate = I made two repositories with safe relative paths (the CLI won't let you create bad ones anymore). I had to manually go into mongo's shell and dork with the relative paths to trigger the error message (simulating existing bad data). Here is the command I used: db.repos.update( {"_id" : "test2"}. {$set : {"relative_path" : "foo"}}) For reference, my test1 repository had relative path foo/bar = Sample output of a failed migrate = -> sudo pulp-migrate Repository [test2] with relative path [foo] conflicts with repository [test1] with relative path [foo/bar]. Relative paths may not be a parent or child directory of another relative path. Please correct the listed repositories. database migration to version 32 complete
*** Bug 654713 has been marked as a duplicate of this bug. ***
build: 0.255
[root@preethi ~]# rpm -q pulp pulp-0.0.255-1.fc15.noarch [root@preethi ~]# [root@preethi ~]# pulp-admin repo create --id=test --relativepath=foo/ Successfully created repository [ test ] [root@preethi ~]# [root@preethi ~]# pulp-admin repo create --id=test1 --relativepath=foo/bar error: error: operation failed: PulpException: New relative path [foo/bar] conflicts with existing relative path [foo]; paths may not be a parent or child directory of another relative path
Pulp v1.0 is released Closed Current Release.
Pulp v1.0 is released.