darcs

Patch 531 Fix warnings in Darcs.Repository.HashedIO. (and 2 more)

Title Fix warnings in Darcs.Repository.HashedIO. (and 2 more)
Superseder Nosy List ganesh, kowey
Related Issues
Status accepted Assigned To ganesh
Milestone 2.5.1

Created on 2011-01-19.16:55:24 by kowey, last changed 2011-01-29.12:55:01 by ganesh.

Files
File name Status Uploaded Type Edit Remove
fix-warnings-in-darcs_repository_hashedio_.dpatch kowey, 2011-01-19.16:55:24 text/x-darcs-patch
unnamed kowey, 2011-01-19.16:55:24
See mailing list archives for discussion on individual patches.
Messages
msg13524 (view) Author: kowey Date: 2011-01-19.16:55:24
3 patches for repository http://darcs.net/releases/branch-2.5:

Fri Jul 23 14:45:33 BST 2010  Eric Kow <kowey@darcs.net>
  * Fix warnings in Darcs.Repository.HashedIO.

Wed Jan 19 15:32:32 GMT 2011  Eric Kow <kowey@darcs.net>
  * Accept issue2035: malicious subpaths not caught.

Wed Jan 19 15:34:50 GMT 2011  Eric Kow <kowey@darcs.net>
  * Resolve issue2035: Catch malicious subpaths.
  A longer-term fix would be to change our subpath representation
  to be components based (eg. like pathlib)


___________________________________________________________
This email has been scanned by MessageLabs' Email Security
System on behalf of the University of Brighton.
For more information see http://www.brighton.ac.uk/is/spam/
___________________________________________________________
Attachments
msg13580 (view) Author: ganesh Date: 2011-01-24.22:11:40
This looks fine. Feels rather ad-hoc, but I can't find any other holes 
from some playing.
msg13588 (view) Author: ganesh Date: 2011-01-25.21:34:04
This goes wrong on Windows: 
http://buildbot.darcs.net/builders/6.10.4%20Vista%20RELEASE/builds/18/st
eps/test/logs/stdio

I can't immediately figure out the problem, but presumably it's to do 
with a different definition of absolute paths. That raises two questions 
for me:

1) Is /foo/bar really a safe path on Windows? I would expect it to go to 
the root of the current drive, which doesn't seem good.

2) Should we have a test repo with a c:/ in it for use on Windows?
msg13594 (view) Author: ganesh Date: 2011-01-27.12:15:29
There's a straightforward fix for the test (don't grep for "malicious" - 
the get fails on Windows but for other reasons).

I'll also make a test repo that has c:/ in it.
msg13598 (view) Author: ganesh Date: 2011-01-29.12:55:00
I pushed the followup that doesn't check for 'malicious' straight to 
2.5.1 as it's trivial. I checked that repos with c: in them are also 
correctly rejected on windows, and also that .. is (now) caught by darcs 
too.

For various reasons the tests I wrote for those other things aren't in a 
good state to submit/push yet, so I will probably leave those out of 
2.5.1.
History
Date User Action Args
2011-01-19 16:55:24koweycreate
2011-01-20 13:25:33koweylinkpatch532 superseder
2011-01-20 15:25:57koweysetstatus: needs-review -> needs-screening
milestone: 2.5.1
2011-01-24 22:11:41ganeshsetstatus: needs-screening -> accepted-pending-tests
messages: + msg13580
2011-01-25 21:34:05ganeshsetstatus: accepted-pending-tests -> followup-requested
assignedto: kowey
messages: + msg13588
2011-01-27 12:15:29ganeshsetassignedto: kowey -> ganesh
messages: + msg13594
nosy: + ganesh
2011-01-29 12:55:01ganeshsetstatus: followup-requested -> accepted
messages: + msg13598