2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 07:57:21 +08:00

feat: 防跨站使用网站目录而不是运行目录

This commit is contained in:
耗子
2024-11-18 14:13:09 +08:00
parent 8251a9a70e
commit 50381dff0c

View File

@@ -469,7 +469,7 @@ func (r *websiteRepo) Update(req *request.WebsiteUpdate) error {
userIni := filepath.Join(req.Root, ".user.ini")
if req.OpenBasedir {
if !io.Exists(userIni) {
if err = io.Write(userIni, fmt.Sprintf("open_basedir=%s:/tmp/", req.Root), 0644); err != nil {
if err = io.Write(userIni, fmt.Sprintf("open_basedir=%s:/tmp/", req.Path), 0644); err != nil {
return err
}
}