[darcs-users] darcs patch: Revert --restrict-paths removal. (and 2 more)
Eric Kow
kowey at darcs.net
Mon Jan 5 10:56:58 UTC 2009
On Mon, Jan 05, 2009 at 02:36:09 -0800, David Caldwell wrote:
> I have a few fake darcs repos in the test section of a perl module I'm
> writing. I want to be able to test the module without having darcs
> installed so that the CPAN automated testers can do it for me.
So, I'm still not 100% sure I understand here. Does this mean the only thing
you are really interested in is to be able to create patches with _darcs in
them? Explicitly relative patches and patches with ".." in their paths,
presumably would still actually be malicious in your eyes?
Darcs.CommandsAux says:
| is_malicious_path :: String -> Bool
| is_malicious_path fp =
| not (is_explicitly_relative fp) ||
| splitDirectories fp `contains_any` [ "..", darcsdir ]
| where
| contains_any a b = not . null $ intersect a b
David says:
> I'm going to add a new patch to fix it because that particular patch was
> a straight rollback patch (I didn't write those docs) so it seems a
> little dirty to rollback and then amend... But if you'd rather have it
> that way then let me know and I'll do it.
Either way would have been fine with me. Glad to see rollback serving
its purpose!
> ./t/darcs-hashed/_darcs/pristine.hashed/da39a3ee5e6b4b0d3255bfef95601890afd80709
>> ./t/darcs-old/_darcs
>> ./t/darcs-old/_darcs/inventory
>> ./t/darcs-old/_darcs/pristine
>>
>> If you are sure this is ok then you can run again with the
> --dont-restrict-paths option.
>
> I think this is a better thing to do than a straight documentation patch,
> as no one really cares about the option until you have to avoid the
> check. And when the issue hits you it's nice to have the info right there
> instead of having to root around in the manual (or the source code) for
> what the error means and what you can do about it.
I think I agree with your reasoning about this.
(Still) almost ready to apply these patches :-)
--
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20090105/3df45a5a/attachment.pgp
More information about the darcs-users
mailing list