Bug 408270 - Git clone MUST forbid use of file urls and other unexpected schemes with a whitelist
Summary: Git clone MUST forbid use of file urls and other unexpected schemes with a wh...
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Git (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.0 M2   Edit
Assignee: Matthias Sohn CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2013-05-16 13:33 EDT by Simon Kaegi CLA
Modified: 2013-05-17 01:40 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Kaegi CLA 2013-05-16 13:33:22 EDT
Christian Halstrick noticed...
While playing with orions "clone from git repository" functionality I found out my local orion instance clones from URLs like 'file:/home/user/dondalfi'. With that I get access to all git repos hosted on the machine running the orion server. That's a security hole, or? Is it only that my local orion which can do that or  is it also true for orionhub.org? 

--
This is indeed a problem that needs immediate attention. We need to first explicitly forbid file urls but also should only accept urls from a set of white-listed schemes.
Comment 1 Matthias Sohn CLA 2013-05-16 18:23:46 EDT
I pushed a fix to github:
"Bug 408270 - only allow whitelisted URI schemes"
https://github.com/msohn/orion.server/commit/f35d17158daba51c72249f431f1935eb70cee746
Comment 2 Simon Kaegi CLA 2013-05-16 22:12:44 EDT
Thanks Matthias - I've pushed the change.
Could you please add the provenance blurb when you get a moment. (e.g. I assert that I authored...)
Comment 4 Simon Kaegi CLA 2013-05-16 23:30:58 EDT
Yup, I didn't want to go to bed anyway... the fix is still valid
Comment 5 Simon Kaegi CLA 2013-05-17 01:36:48 EDT
Tests fixed.
I was getting a failure for GitCloneTest.testDeleteInProject but this did not seem to be related to this fix.

The test passed when run in isolation but failed when there was another project entry in the workspace.
Comment 6 Matthias Sohn CLA 2013-05-17 01:40:53 EDT
I authored 100% of this fix, have the rights to donate the content to Eclipse
and contribute the content under the EPL