Comments (3)
Hey. Thanks for spotting this! As a side note, the index area is far from being achieved. ;-)
Correct me if I'm wrong but when a full path is being passed, I think LibGit2Sharp code should make sure that the caller is not trying to stage a file living outside of the working directory structure.
Two ways to make it happen:
- Make libgit2 implement this and LibGit2Sharp will wrap it later (In good progress, I think :) )
- Fake it now within LibGit2Sharp
- Ensure the rooted passed path leads to a file within the working directory (eg.
path.StartsWith(repo.Info.WorkingDirectory)
or something similar) - Turn the full path into a relative path to the working directory
- Use the relative path to delegate the staging to libgit2
- When it's ready in libgit2, we'll just have to remove the boilerplate code
- Ensure the rooted passed path leads to a file within the working directory (eg.
How does this sound?
from libgit2sharp.
Hey! I think this issue should now be fixed.
Could you please give a try to https://github.com/libgit2/libgit2sharp/commits/vNext ?
from libgit2sharp.
Applied and merged into master.
@cbilson: Thanks for the report
from libgit2sharp.
Related Issues (20)
- TreeDefinition item recursive remove not working HOT 2
- [Question] Is there a way to add safe.directory '*' via libgit2 HOT 3
- Support for MacCatalyst
- LibGit2SharpException: could not set credentials: could not open libssl HOT 6
- Unable to clone git repo while using this library. HOT 9
- `LibGit2SharpException` when cloning repository within a Docker container HOT 9
- Running libgit2sharp on Ubuntu 22.04 Arm64 got `LibGit2Sharp.LibGit2SharpException: the SSL certificate is invalid` HOT 12
- Getting exception "too many redirects or authentication replays" HOT 2
- ObjectDatabase.Write<T>(Stream stream...) overload does not respect T
- .NET Standard support? HOT 4
- Unable to push to Azure DevOps repository when project name contains space HOT 1
- CloneOptions does not contains a definition of CredentialsProvider,,, HOT 12
- Performance regression when reading files from the tree in parallel HOT 6
- Security: Update to libgit2 1.7.2 HOT 3
- unexpected EOF when trying to fetch from remote
- Please consider adding AOT support for .Diff.Compare<T>() HOT 19
- How to checkout a specific folder from repository?
- LibGit2SharpException: could not find appropriate mechanism for credentials HOT 5
- FetchOptions in CloneOptions is readonly and has not been set in constructor !
- Git Fetch fails with could not decrypt tls message when TLS 1.3 is allowed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libgit2sharp.