Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ To keep your OpenList instance secure:
- Regularly review mounted storage permissions and revoke unused API tokens.
- When using Docker, avoid running the container as root if possible.

## Security Response Scope (Applicable to 4.x)

This policy applies only to version 4.x.

In 4.x, privilege isolation between authenticated users (including administrators and regular users) is not currently considered a security boundary that this project commits to maintaining.

In principle, only security vulnerabilities that can be exploited without valid authentication (including authentication bypass vulnerabilities) fall within the scope of this project's dedicated security response process.

Privilege isolation issues that require valid authentication to exploit should preferably be submitted and fixed through regular Pull Requests rather than handled through Security Advisories.

This policy only defines the scope of the project's security response and does not imply that such issues are not security vulnerabilities. For exceptional cases that may have severe security implications, the maintenance team reserves the right to initiate the security response process at its discretion.

This policy does not retroactively affect previously accepted security vulnerability reports.

This project is currently preparing version 5.x. In the future, we may redefine the security boundaries between authenticated users by refactoring the user and permission systems and adjust the security response scope accordingly.

## Acknowledgments

We sincerely thank all security researchers and community members who responsibly disclose vulnerabilities and help make OpenList safer for everyone.
Expand Down Expand Up @@ -84,6 +100,22 @@ We sincerely thank all security researchers and community members who responsibl
- 定期检查已挂载存储的权限,并撤销未使用的 API 令牌。
- 使用 Docker 部署时,尽可能避免以 root 用户运行容器。

## 安全响应范围 (适用于 4.x)

本政策仅适用于 4.x 版本。

在 4.x 中,已认证用户 (包括管理员和普通用户) 之间的权限隔离暂不属于本项目承诺维护的安全边界。

只有无需有效身份认证即可利用的安全漏洞 (包括身份认证绕过漏洞),原则上才纳入本项目的专门安全响应流程。

需要有效身份认证才能利用的权限隔离问题,应优先通过普通 Pull Request 提交和修复,而非通过安全公告 (Security Advisory) 处理。

本政策仅限定项目维护团队的安全响应范围,不代表此类问题不构成安全漏洞。对于可能造成严重安全影响的特殊情况,维护团队保留酌情启动安全响应流程的权利。

本政策不追溯影响此前已正式接受的安全漏洞报告。

本项目正在准备 5.x 版本,未来可能通过重构用户及权限系统,重新定义已认证用户之间的安全边界,并相应调整安全响应范围。

## 致谢

我们衷心感谢所有负责任地披露漏洞、帮助 OpenList 变得更加安全的安全研究人员和社区成员。
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ else
# webVersion=$(eval "curl -fsSL --max-time 2 $githubAuthArgs \"https://api.github.com/repos/$frontendRepo/releases/latest\"" | grep "tag_name" | head -n 1 | awk -F ":" '{print $2}' | sed 's/\"//g;s/,//g;s/ //g')
fi

webVersion=4.2.6
webVersion=4.2.7

echo "backend version: $version"
echo "frontend version: $webVersion"
Expand Down
1 change: 1 addition & 0 deletions drivers/139/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type Addition struct {
CustomUploadPartSize int64 `json:"custom_upload_part_size" type:"number" default:"0" help:"0 for auto"`
ReportRealSize bool `json:"report_real_size" type:"bool" default:"true" help:"Enable to report the real file size during upload"`
UseLargeThumbnail bool `json:"use_large_thumbnail" type:"bool" default:"false" help:"Enable to use large thumbnail for images"`
ClientType string `json:"client_type" type:"select" options:"web,pc" default:"web" help:"Client type reported to the personal cloud API. web (9) allows uploading files up to 50 GB; pc (13) raises the single file upload limit to 500 GB."`

Concurrency int `json:"concurrency" type:"number" default:"4"`
ChunkSize int `json:"chunk_size" type:"number" default:"512"`
Expand Down
20 changes: 19 additions & 1 deletion drivers/139/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,24 @@ func unicode(str string) string {
return textUnquoted
}

// Client types reported in the X-Yun-Client-Info header. The web client is the
// default with a 50 GB single file upload limit, while the PC client raises the
// limit to 500 GB.
const (
yunClientTypeWeb = "9"
yunClientTypePC = "13"
)

// yunClientInfo returns the X-Yun-Client-Info header value for the configured
// client_type addition. Anything other than pc falls back to the web client.
func (d *Yun139) yunClientInfo() string {
clientType := yunClientTypeWeb
if d.ClientType == "pc" {
clientType = yunClientTypePC
}
return "||" + clientType + "|7.14.0|chrome|120.0.0.0|||windows 10||zh-CN|||dW5kZWZpbmVk||"
}

func (d *Yun139) personalRequest(pathname string, method string, callback base.ReqCallback, resp interface{}) ([]byte, error) {
url := d.getPersonalCloudHost() + pathname
req := base.RestyClient.R()
Expand Down Expand Up @@ -553,7 +571,7 @@ func (d *Yun139) personalRequest(pathname string, method string, callback base.R
"X-Yun-Api-Version": "v1",
"X-Yun-App-Channel": "10000034",
"X-Yun-Channel-Source": "10000034",
"X-Yun-Client-Info": "||13|7.14.0|chrome|120.0.0.0|||windows 10||zh-CN|||dW5kZWZpbmVk||",
"X-Yun-Client-Info": d.yunClientInfo(),
"X-Yun-Module-Type": "100",
"X-Yun-Svc-Type": "1",
})
Expand Down
27 changes: 27 additions & 0 deletions drivers/139/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,33 @@ func TestExtractFastLoginCookies(t *testing.T) {
}
}

func TestYunClientInfoClientType(t *testing.T) {
tests := []struct {
name string
clientType string
want string
}{
{
name: "default web client",
want: "||9|7.14.0|chrome|120.0.0.0|||windows 10||zh-CN|||dW5kZWZpbmVk||",
},
{
name: "pc client",
clientType: "pc",
want: "||13|7.14.0|chrome|120.0.0.0|||windows 10||zh-CN|||dW5kZWZpbmVk||",
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
d := Yun139{Addition: Addition{ClientType: tt.clientType}}
if got := d.yunClientInfo(); got != tt.want {
t.Fatalf("yunClientInfo() = %q, want %q", got, tt.want)
}
})
}
}

func TestCredentialState(t *testing.T) {
tests := []struct {
name string
Expand Down
Loading