afero icon indicating copy to clipboard operation
afero copied to clipboard

A FileSystem Abstraction System for Go

Results 146 afero issues
Sort by recently updated
recently updated
newest added

检测到 spf13/afero 一共引入了77个开源组件,存在2个漏洞 ``` 漏洞标题:Google Kubernetes API Server 资源管理错误漏洞 缺陷组件:gopkg.in/[email protected] 漏洞编号:CVE-2019-11254 漏洞描述:Google Kubernetes是美国谷歌(Google)公司的一套开源的Docker容器集群管理系统。该系统为容器化的应用提供资源调度、部署运行、服务发现和扩容缩容等功能。API server是其中的一个API(应用编程接口)服务器。 Google Kubernetes 1.15.10之前版本、1.16.7之前版本和1.17.3之前版本中的API Server组件存在资源管理错误漏洞。远程攻击者可借助特制请求利用该漏洞造成拒绝服务。 国家漏洞库信息:https://www.cnvd.org.cn/flaw/show/CNVD-2020-35519 影响范围:(∞, 2.2.8) 最小修复版本:2.2.8 缺陷组件引入路径:github.com/spf13/afero@->gopkg.in/[email protected] ``` 另外还有2个漏洞,详细报告:https://mofeisec.com/jr?p=a0bfd4

Adds tests: - `*mem.File` implementation of `io.ReaderAt` must return non-nil error when reading less than length of give slice. - `MemMapFs` must pass `fstest.TestFS` tests for non-empty files. Fixes #352...

When attempting to create a new file on GCSFS with flags os.O_CREATE|os.O_TRUNC, the resource delete operation throws an error "object doesn't exist" ``` if flag&os.O_TRUNC != 0 { err =...

The current implementation of `*mem.File` violates the contract defined by the Standard Library's `io.ReaderAt` interface. Specifically, according to [the docs for `io.ReaderAt`](https://pkg.go.dev/io#ReaderAt): > When ReadAt returns n < len(p), it...

fixes #350: Use `os.ErrPermission` instead of `syscall.EPERM` to make sure that the error is consistent over different operating systems and can be checked with `os.isPermission(err)`

When using the `ReadOnlyFs` filter, the error returned when trying to write to the FS is different on Windows than on Linux or MacOSX ### How to reproduce: ```go package...

Trying to use `template.ParseFS()` isn't possible because `fs.FS` implements `Open(fs.File, error)` where afero implements `Open(afero.File, error)` ``` ./template.go:84:12: cannot use t.fs (type afero.Fs) as type fs.FS in argument to "text/template".New(filepath.Base(src)).Funcs(sprig.TxtFuncMap()).Funcs("text/template".FuncMap{...}).Delims(t.delims.left,...

TLDR: When one calls `IsDir()` on a FileInfo returned back from `afero.ReadDir`, and that FileInfo is for a symlink to another directory, the `IsDir()` function returns `false`. When one gets...

Is there a way to increase the memory file size? it seems to limit at 255 chars. I've wrote a simple example to show the issue. ` fs := afero.NewMemMapFs()...

### Code: ``` func test(t *testing.T) { path := "." //path, _ = filepath.Abs(path) fs := afero.NewBasePathFs(afero.NewOsFs(), path) assert.NoError(t, afero.WriteFile(fs, "aaa", []byte("ttt"), 0o755)) } ``` ### Result: ``` openfile aaa:...